diff --git a/OpenSim/Services/IntegrationService/IntegrationServiceBase.cs b/OpenSim/Services/IntegrationService/IntegrationServiceBase.cs index fd310ae188..531c724860 100644 --- a/OpenSim/Services/IntegrationService/IntegrationServiceBase.cs +++ b/OpenSim/Services/IntegrationService/IntegrationServiceBase.cs @@ -90,9 +90,9 @@ namespace OpenSim.Services.IntegrationService AddinRegistry registry = new AddinRegistry(RegistryLocation, "."); - suppress_console_output_(true); + Ux.suppress_console_output_(true); m_PluginManager = new PluginManager(registry); - suppress_console_output_(false); + Ux.suppress_console_output_(false); // Deal with files only for now - will add url/environment later m_IntegrationConfigLoc = serverConfig.GetString("IntegrationConfig", String.Empty); @@ -176,20 +176,20 @@ namespace OpenSim.Services.IntegrationService m_log.Info ("[INTEGRATION SERVICE]: Plugin Loaded: " + args.AddinId); } - private static TextWriter prev_console_; - public void suppress_console_output_(bool save) - { - if (save) - { - prev_console_ = System.Console.Out; - System.Console.SetOut(new StreamWriter(Stream.Null)); - } - else - { - if (prev_console_ != null) - System.Console.SetOut(prev_console_); - } - } +// private static TextWriter prev_console_; +// public void suppress_console_output_(bool save) +// { +// if (save) +// { +// prev_console_ = System.Console.Out; +// System.Console.SetOut(new StreamWriter(Stream.Null)); +// } +// else +// { +// if (prev_console_ != null) +// System.Console.SetOut(prev_console_); +// } +// } private void LoadingPlugin(IntegrationPlugin plugin) { diff --git a/OpenSim/Services/IntegrationService/IntegrationUtils.cs b/OpenSim/Services/IntegrationService/IntegrationUtils.cs index 08daaf3112..640cb97a67 100644 --- a/OpenSim/Services/IntegrationService/IntegrationUtils.cs +++ b/OpenSim/Services/IntegrationService/IntegrationUtils.cs @@ -149,5 +149,20 @@ namespace OpenSim.Services.IntegrationService } + private static TextWriter prev_console_; + public static void suppress_console_output_(bool save) + { + if (save) + { + prev_console_ = System.Console.Out; + System.Console.SetOut(new StreamWriter(Stream.Null)); + } + else + { + if (prev_console_ != null) + System.Console.SetOut(prev_console_); + } + } + } } \ No newline at end of file diff --git a/OpenSim/Services/IntegrationService/PluginManager.cs b/OpenSim/Services/IntegrationService/PluginManager.cs index 7f18407b68..e37fa958dd 100644 --- a/OpenSim/Services/IntegrationService/PluginManager.cs +++ b/OpenSim/Services/IntegrationService/PluginManager.cs @@ -36,6 +36,8 @@ using Mono.Addins.Setup; using Mono.Addins.Description; using OpenSim.Framework; +using Ux = OpenSim.Services.IntegrationService.IUtils; + namespace OpenSim.Services.IntegrationService { // This will maintain the plugin repositories and plugins @@ -55,13 +57,14 @@ namespace OpenSim.Services.IntegrationService PackageCollection toUninstall; DependencyCollection unresolved; - IProgressStatus ps = new ConsoleProgressStatus(true); + IProgressStatus ps = new ConsoleProgressStatus(false); - m_Registry.Update(ps); + // m_Registry.Update(ps); string name = Addin.GetIdName(args[1]); string version = Addin.GetIdVersion(args[1]); + AddinRepositoryEntry[] aentry = Repositories.GetAvailableAddin(name, version); foreach (AddinRepositoryEntry ae in aentry) @@ -78,7 +81,9 @@ namespace OpenSim.Services.IntegrationService return "Install"; } else + { return "Bomb"; + } } // Remove plugin @@ -97,9 +102,8 @@ namespace OpenSim.Services.IntegrationService MainConsole.Instance.OutputFormat("Uninstalling plugin {0}", addin.Id); AddinManager.Registry.DisableAddin(addin.Id); addin.Enabled = false; - IProgressStatus ps = new ConsoleProgressStatus(true); + IProgressStatus ps = new ConsoleProgressStatus(false); Uninstall(ps, addin.Id); - // m_Registry.Rebuild(null); return; } @@ -174,7 +178,7 @@ namespace OpenSim.Services.IntegrationService public void GetRepository() { - Repositories.UpdateAllRepositories (new ConsoleProgressStatus (true)); + Repositories.UpdateAllRepositories (new ConsoleProgressStatus (false)); } // Remove a repository from the list @@ -330,13 +334,12 @@ namespace OpenSim.Services.IntegrationService // AddinManager.Registry.Update(); if(m_Registry.IsAddinEnabled(addin.Id)) { - ConsoleProgressStatus ps = new ConsoleProgressStatus(true); + ConsoleProgressStatus ps = new ConsoleProgressStatus(false); if (!AddinManager.AddinEngine.IsAddinLoaded(addin.Id)) { AddinManager.Registry.Rebuild(ps); AddinManager.AddinEngine.LoadAddin(ps, addin.Id); } - } else {