* Propogate OpenSimMain hack to stop mono-addins scanning warnings to the grid managing
* This hack just temporarily sends console output to /dev/null when we make the relevant addins calls, restoring it afterwards0.6.0-stable
parent
721ee47149
commit
01f933c273
|
@ -118,8 +118,15 @@ namespace OpenSim.Grid.GridServer
|
||||||
|
|
||||||
protected void LoadGridPlugins()
|
protected void LoadGridPlugins()
|
||||||
{
|
{
|
||||||
|
// Temporary hack to stop mono-addins scanning warnings from coming out on the console
|
||||||
|
TextWriter oldOutput = Console.Out;
|
||||||
|
Console.SetOut(new StreamWriter(Stream.Null));
|
||||||
|
|
||||||
AddinManager.Initialize(".");
|
AddinManager.Initialize(".");
|
||||||
AddinManager.Registry.Update(null);
|
AddinManager.Registry.Update(null);
|
||||||
|
|
||||||
|
// Returns the console.writelines back to the console's stream
|
||||||
|
Console.SetOut(oldOutput);
|
||||||
|
|
||||||
ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/GridServer");
|
ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/GridServer");
|
||||||
foreach (TypeExtensionNode node in nodes)
|
foreach (TypeExtensionNode node in nodes)
|
||||||
|
|
|
@ -157,14 +157,14 @@ namespace OpenSim
|
||||||
if (Directory.Exists("addin-db-001"))
|
if (Directory.Exists("addin-db-001"))
|
||||||
Directory.Delete("addin-db-001", true);
|
Directory.Delete("addin-db-001", true);
|
||||||
|
|
||||||
//This blocks the scanning warnings from outputing to the console.
|
// This blocks the scanning warnings from outputing to the console.
|
||||||
TextWriter oldOutput = Console.Out;
|
TextWriter oldOutput = Console.Out;
|
||||||
Console.SetOut(new StreamWriter(Stream.Null));
|
Console.SetOut(new StreamWriter(Stream.Null));
|
||||||
|
|
||||||
AddinManager.Initialize(".");
|
AddinManager.Initialize(".");
|
||||||
AddinManager.Registry.Update(null);
|
AddinManager.Registry.Update(null);
|
||||||
|
|
||||||
//Returns the console.writelines back to the console's stream
|
// Returns the console.writelines back to the console's stream
|
||||||
Console.SetOut(oldOutput);
|
Console.SetOut(oldOutput);
|
||||||
|
|
||||||
Application.iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini");
|
Application.iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini");
|
||||||
|
|
Loading…
Reference in New Issue