aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Base/ServerUtils.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Base/ServerUtils.cs')
-rw-r--r--OpenSim/Server/Base/ServerUtils.cs34
1 files changed, 18 insertions, 16 deletions
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs
index 08ba50d..18a4266 100644
--- a/OpenSim/Server/Base/ServerUtils.cs
+++ b/OpenSim/Server/Base/ServerUtils.cs
@@ -41,7 +41,7 @@ using OpenSim.Framework.Servers.HttpServer;
41using OpenSim.Framework.Servers; 41using OpenSim.Framework.Servers;
42 42
43 43
44[assembly:AddinRoot("Robust", "0.1")] 44[assembly:AddinRoot("Robust", OpenSim.VersionInfo.VersionNumber)]
45namespace OpenSim.Server.Base 45namespace OpenSim.Server.Base
46{ 46{
47 [TypeExtensionPoint(Path="/Robust/Connector", Name="RobustConnector")] 47 [TypeExtensionPoint(Path="/Robust/Connector", Name="RobustConnector")]
@@ -89,9 +89,9 @@ namespace OpenSim.Server.Base
89 Config = config; 89 Config = config;
90 90
91 Registry = new AddinRegistry(registryPath, "."); 91 Registry = new AddinRegistry(registryPath, ".");
92 suppress_console_output_(true); 92 //suppress_console_output_(true);
93 AddinManager.Initialize(registryPath); 93 AddinManager.Initialize(registryPath);
94 suppress_console_output_(false); 94 //suppress_console_output_(false);
95 AddinManager.Registry.Update(); 95 AddinManager.Registry.Update();
96 CommandManager commandmanager = new CommandManager(Registry); 96 CommandManager commandmanager = new CommandManager(Registry);
97 AddinManager.AddExtensionNodeHandler("/Robust/Connector", OnExtensionChanged); 97 AddinManager.AddExtensionNodeHandler("/Robust/Connector", OnExtensionChanged);
@@ -196,17 +196,19 @@ namespace OpenSim.Server.Base
196 196
197 public static byte[] SerializeResult(XmlSerializer xs, object data) 197 public static byte[] SerializeResult(XmlSerializer xs, object data)
198 { 198 {
199 MemoryStream ms = new MemoryStream(); 199 using (MemoryStream ms = new MemoryStream())
200 XmlTextWriter xw = new XmlTextWriter(ms, Util.UTF8); 200 using (XmlTextWriter xw = new XmlTextWriter(ms, Util.UTF8))
201 xw.Formatting = Formatting.Indented; 201 {
202 xs.Serialize(xw, data); 202 xw.Formatting = Formatting.Indented;
203 xw.Flush(); 203 xs.Serialize(xw, data);
204 xw.Flush();
204 205
205 ms.Seek(0, SeekOrigin.Begin); 206 ms.Seek(0, SeekOrigin.Begin);
206 byte[] ret = ms.GetBuffer(); 207 byte[] ret = ms.GetBuffer();
207 Array.Resize(ref ret, (int)ms.Length); 208 Array.Resize(ref ret, (int)ms.Length);
208 209
209 return ret; 210 return ret;
211 }
210 } 212 }
211 213
212 /// <summary> 214 /// <summary>
@@ -266,7 +268,7 @@ namespace OpenSim.Server.Base
266 && pluginType.ToString() != pluginType.Namespace + "." + className) 268 && pluginType.ToString() != pluginType.Namespace + "." + className)
267 continue; 269 continue;
268 270
269 Type typeInterface = pluginType.GetInterface(interfaceName, true); 271 Type typeInterface = pluginType.GetInterface(interfaceName);
270 272
271 if (typeInterface != null) 273 if (typeInterface != null)
272 { 274 {
@@ -280,11 +282,11 @@ namespace OpenSim.Server.Base
280 { 282 {
281 if (!(e is System.MissingMethodException)) 283 if (!(e is System.MissingMethodException))
282 { 284 {
283 m_log.ErrorFormat("[SERVER UTILS]: Error loading plugin {0} from {1}. Exception: {2}, {3}", 285 m_log.Error(string.Format("[SERVER UTILS]: Error loading plugin {0} from {1}. Exception: {2}",
284 interfaceName, 286 interfaceName,
285 dllName, 287 dllName,
286 e.InnerException == null ? e.Message : e.InnerException.Message, 288 e.InnerException == null ? e.Message : e.InnerException.Message),
287 e.StackTrace); 289 e);
288 } 290 }
289 m_log.ErrorFormat("[SERVER UTILS]: Error loading plugin {0}: {1} args.Length {2}", dllName, e.Message, args.Length); 291 m_log.ErrorFormat("[SERVER UTILS]: Error loading plugin {0}: {1} args.Length {2}", dllName, e.Message, args.Length);
290 return null; 292 return null;