Browse Source

remove some useless NULL arguments

UbitUmarov 4 years ago
parent
commit
b98ad6c53c

+ 10 - 10
OpenSim/Framework/Console/ConsoleUtil.cs

@@ -75,7 +75,7 @@ namespace OpenSim.Framework.Console
         {
             if (File.Exists(path))
             {
-                console.Output("File {0} already exists.  Please move or remove it.", null, path);
+                console.Output("File {0} already exists.  Please move or remove it.", path);
                 return false;
             }
 
@@ -97,7 +97,7 @@ namespace OpenSim.Framework.Console
             if (!UUID.TryParse(rawUuid, out uuid))
             {
                 if (console != null)
-                    console.Output("ERROR: {0} is not a valid uuid", null, rawUuid);
+                    console.Output("ERROR: {0} is not a valid uuid", rawUuid);
 
                 return false;
             }
@@ -110,7 +110,7 @@ namespace OpenSim.Framework.Console
             if (!uint.TryParse(rawLocalId, out localId))
             {
                 if (console != null)
-                    console.Output("ERROR: {0} is not a valid local id", null, localId);
+                    console.Output("ERROR: {0} is not a valid local id", localId);
 
                 return false;
             }
@@ -118,7 +118,7 @@ namespace OpenSim.Framework.Console
             if (localId == 0)
             {
                 if (console != null)
-                    console.Output("ERROR: {0} is not a valid local id - it must be greater than 0", null, localId);
+                    console.Output("ERROR: {0} is not a valid local id - it must be greater than 0", localId);
 
                 return false;
             }
@@ -150,7 +150,7 @@ namespace OpenSim.Framework.Console
             }
 
             if (console != null)
-                console.Output("ERROR: {0} is not a valid UUID or local id", null, rawId);
+                console.Output("ERROR: {0} is not a valid UUID or local id", rawId);
 
             return false;
         }
@@ -167,7 +167,7 @@ namespace OpenSim.Framework.Console
             if (!bool.TryParse(rawConsoleString, out b))
             {
                 if (console != null)
-                    console.Output("ERROR: {0} is not a true or false value", null, rawConsoleString);
+                    console.Output("ERROR: {0} is not a true or false value", rawConsoleString);
 
                 return false;
             }
@@ -187,7 +187,7 @@ namespace OpenSim.Framework.Console
             if (!int.TryParse(rawConsoleInt, out i))
             {
                 if (console != null)
-                    console.Output("ERROR: {0} is not a valid integer", null, rawConsoleInt);
+                    console.Output("ERROR: {0} is not a valid integer", rawConsoleInt);
 
                 return false;
             }
@@ -207,7 +207,7 @@ namespace OpenSim.Framework.Console
             if (!float.TryParse(rawConsoleInput, out i))
             {
                 if (console != null)
-                    console.Output("ERROR: {0} is not a valid float", null, rawConsoleInput);
+                    console.Output("ERROR: {0} is not a valid float", rawConsoleInput);
 
                 return false;
             }
@@ -227,7 +227,7 @@ namespace OpenSim.Framework.Console
             if (!double.TryParse(rawConsoleInput, out i))
             {
                 if (console != null)
-                    console.Output("ERROR: {0} is not a valid double", null, rawConsoleInput);
+                    console.Output("ERROR: {0} is not a valid double", rawConsoleInput);
 
                 return false;
             }
@@ -249,7 +249,7 @@ namespace OpenSim.Framework.Console
                 if (i < 0)
                 {
                     if (console != null)
-                        console.Output("ERROR: {0} is not a positive integer", null, rawConsoleInt);
+                        console.Output("ERROR: {0} is not a positive integer", rawConsoleInt);
 
                     return false;
                 }

+ 1 - 1
OpenSim/Framework/Monitoring/ChecksManager.cs

@@ -88,7 +88,7 @@ namespace OpenSim.Framework.Monitoring
                         con.Output("check categories available are:");
 
                         foreach (string category in RegisteredChecks.Keys)
-                            con.Output("  {0}", null, category);
+                            con.Output("  {0}", category);
                     }
 //                    else
 //                    {

+ 2 - 2
OpenSim/Framework/Monitoring/StatsLogger.cs

@@ -79,7 +79,7 @@ namespace OpenSim.Framework.Monitoring
             if (cmd[2] == "start")
             {
                 Start();
-                con.Output("Now recording all stats to file every {0}ms", null, m_statsLogIntervalMs);
+                con.Output("Now recording all stats to file every {0}ms", m_statsLogIntervalMs);
             }
             else if (cmd[2] == "stop")
             {
@@ -106,7 +106,7 @@ namespace OpenSim.Framework.Monitoring
                     sw.WriteLine(line);
             }
 
-            MainConsole.Instance.Output("Stats saved to file {0}", null, path);
+            MainConsole.Instance.Output("Stats saved to file {0}", path);
         }
 
         public static void Start()

+ 1 - 1
OpenSim/Framework/Monitoring/StatsManager.cs

@@ -117,7 +117,7 @@ namespace OpenSim.Framework.Monitoring
                     {
                         con.Output("Statistic categories available are:");
                         foreach (string category in RegisteredStats.Keys)
-                            con.Output("  {0}", null, category);
+                            con.Output("  {0}", category);
                     }
                     else
                     {

+ 6 - 6
OpenSim/Framework/Monitoring/WorkManager.cs

@@ -224,14 +224,14 @@ namespace OpenSim.Framework.Monitoring
             }
             else if (subCommand == "status")
             {
-                MainConsole.Instance.Output("Job engine running: {0}", null, JobEngine.IsRunning);
+                MainConsole.Instance.Output("Job engine running: {0}", JobEngine.IsRunning);
 
                 JobEngine.Job job = JobEngine.CurrentJob;
-                MainConsole.Instance.Output("Current job {0}", null, job != null ? job.Name : "none");
+                MainConsole.Instance.Output("Current job {0}", job != null ? job.Name : "none");
 
                 MainConsole.Instance.Output(
-                    "Jobs waiting: {0}", null, JobEngine.IsRunning ? JobEngine.JobsWaiting.ToString() : "n/a");
-                MainConsole.Instance.Output("Log Level: {0}", null, JobEngine.LogLevel);
+                    "Jobs waiting: {0}", JobEngine.IsRunning ? JobEngine.JobsWaiting.ToString() : "n/a");
+                MainConsole.Instance.Output("Log Level: {0}", JobEngine.LogLevel);
             }
             else if (subCommand == "log")
             {
@@ -246,12 +246,12 @@ namespace OpenSim.Framework.Monitoring
                 //                if (ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, args[4], out logLevel))
                 //                {
                 JobEngine.LogLevel = logLevel;
-                MainConsole.Instance.Output("Set debug log level to {0}", null, JobEngine.LogLevel);
+                MainConsole.Instance.Output("Set debug log level to {0}", JobEngine.LogLevel);
                 //                }
             }
             else
             {
-                MainConsole.Instance.Output("Unrecognized job engine subcommand {0}", null, subCommand);
+                MainConsole.Instance.Output("Unrecognized job engine subcommand {0}", subCommand);
             }
         }
     }

+ 3 - 3
OpenSim/Framework/PluginManager.cs

@@ -129,7 +129,7 @@ namespace OpenSim.Framework
             }
 
             Addin addin = addins[ndx];
-            MainConsole.Instance.Output("Uninstalling plugin {0}", null, addin.Id);
+            MainConsole.Instance.Output("Uninstalling plugin {0}", addin.Id);
             AddinManager.Registry.DisableAddin(addin.Id);
             addin.Enabled = false;
             IProgressStatus ps = new ConsoleProgressStatus(false);
@@ -487,7 +487,7 @@ namespace OpenSim.Framework
             }
             else
             {
-                MainConsole.Instance.Output("Not Enabled in this domain {0}", null, addin.Name);
+                MainConsole.Instance.Output("Not Enabled in this domain {0}", addin.Name);
             }
             return;
         }
@@ -503,7 +503,7 @@ namespace OpenSim.Framework
 
             foreach (Addin addin in addins)
             {
-                MainConsole.Instance.Output("Addin {0}", null, addin.Name);
+                MainConsole.Instance.Output("Addin {0}", addin.Name);
             }
         }
 

+ 5 - 5
OpenSim/Framework/Servers/MainServer.cs

@@ -192,7 +192,7 @@ namespace OpenSim.Framework.Servers
 
                 if (!int.TryParse(rawNewDebug, out newDebug))
                 {
-                    MainConsole.Instance.Output("{0} is not a valid debug level", null, rawNewDebug);
+                    MainConsole.Instance.Output("{0} is not a valid debug level", rawNewDebug);
                     return;
                 }
 
@@ -205,22 +205,22 @@ namespace OpenSim.Framework.Servers
                 if (allReqs || inReqs)
                 {
                     MainServer.DebugLevel = newDebug;
-                    MainConsole.Instance.Output("IN debug level set to {0}", null, newDebug);
+                    MainConsole.Instance.Output("IN debug level set to {0}", newDebug);
                 }
 
                 if (allReqs || outReqs)
                 {
                     WebUtil.DebugLevel = newDebug;
-                    MainConsole.Instance.Output("OUT debug level set to {0}", null, newDebug);
+                    MainConsole.Instance.Output("OUT debug level set to {0}", newDebug);
                 }
             }
             else
             {
                 if (allReqs || inReqs)
-                    MainConsole.Instance.Output("Current IN debug level is {0}", null, DebugLevel);
+                    MainConsole.Instance.Output("Current IN debug level is {0}", DebugLevel);
 
                 if (allReqs || outReqs)
-                    MainConsole.Instance.Output("Current OUT debug level is {0}", null, WebUtil.DebugLevel);
+                    MainConsole.Instance.Output("Current OUT debug level is {0}", WebUtil.DebugLevel);
             }
         }
 

+ 5 - 5
OpenSim/Framework/Servers/ServerBase.cs

@@ -492,7 +492,7 @@ namespace OpenSim.Framework.Servers
 
             if (!int.TryParse(rawLevel, out newLevel))
             {
-                MainConsole.Instance.Output("{0} is not a valid debug level", null, rawLevel);
+                MainConsole.Instance.Output("{0} is not a valid debug level", rawLevel);
                 return;
             }
 
@@ -503,7 +503,7 @@ namespace OpenSim.Framework.Servers
             }
 
             Util.LogThreadPool = newLevel;
-            MainConsole.Instance.Output("LogThreadPool set to {0}", null, newLevel);
+            MainConsole.Instance.Output("LogThreadPool set to {0}", newLevel);
         }
 
         private void HandleForceGc(string module, string[] args)
@@ -991,9 +991,9 @@ namespace OpenSim.Framework.Servers
             }
 
             if (Watchdog.AbortThread(threadId))
-                MainConsole.Instance.Output("Aborted thread with id {0}", null, threadId);
+                MainConsole.Instance.Output("Aborted thread with id {0}", threadId);
             else
-                MainConsole.Instance.Output("ERROR - Thread with id {0} not found in managed threads", null, threadId);
+                MainConsole.Instance.Output("ERROR - Thread with id {0} not found in managed threads", threadId);
         }
 
         /// <summary>
@@ -1020,7 +1020,7 @@ namespace OpenSim.Framework.Servers
         protected void Notice(string format, params object[] components)
         {
             if (m_console != null)
-                m_console.Output(format, null, components);
+                m_console.Output(format, components);
         }
 
         public virtual void Shutdown()

+ 4 - 4
OpenSim/Region/Application/OpenSim.cs

@@ -783,7 +783,7 @@ namespace OpenSim
             if (SceneManager.TryGetScene(regInfo.RegionID, out existingScene))
             {
                 MainConsole.Instance.Output(
-                    "ERROR: Cannot create region {0} with ID {1}, this ID is already assigned to region {2}", null,
+                    "ERROR: Cannot create region {0} with ID {1}, this ID is already assigned to region {2}",
                     regInfo.RegionName, regInfo.RegionID, existingScene.RegionInfo.RegionName);
 
                 return;
@@ -980,7 +980,7 @@ namespace OpenSim
                     SceneManager.ForEachSelectedScene(
                         scene =>
                         {
-                            MainConsole.Instance.Output("Loaded region modules in {0} are:", null, scene.Name);
+                            MainConsole.Instance.Output("Loaded region modules in {0} are:", scene.Name);
 
                             List<IRegionModuleBase> sharedModules = new List<IRegionModuleBase>();
                             List<IRegionModuleBase> nonSharedModules = new List<IRegionModuleBase>();
@@ -994,10 +994,10 @@ namespace OpenSim
                             }
 
                             foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name))
-                                MainConsole.Instance.Output("New Region Module (Shared): {0}", null, module.Name);
+                                MainConsole.Instance.Output("New Region Module (Shared): {0}", module.Name);
 
                             foreach (IRegionModuleBase module in nonSharedModules.OrderBy(m => m.Name))
-                                MainConsole.Instance.Output("New Region Module (Non-Shared): {0}", null, module.Name);
+                                MainConsole.Instance.Output("New Region Module (Non-Shared): {0}", module.Name);
                         }
                     );
 

+ 2 - 2
OpenSim/Region/Application/OpenSimBase.cs

@@ -593,7 +593,7 @@ namespace OpenSim
                 estateOwnerPassword = Config.Configs[ESTATE_SECTION_NAME].GetString("DefaultEstateOwnerPassword", null);
             }
 
-            MainConsole.Instance.Output("Estate {0} has no owner set.", null, regionInfo.EstateSettings.EstateName);
+            MainConsole.Instance.Output("Estate {0} has no owner set.", regionInfo.EstateSettings.EstateName);
             List<char> excluded = new List<char>(new char[1]{' '});
 
 
@@ -1003,7 +1003,7 @@ namespace OpenSim
 
             if (estatesByName.ContainsKey(newName))
             {
-                MainConsole.Instance.Output("An estate named {0} already exists.  Please try again.", null, newName);
+                MainConsole.Instance.Output("An estate named {0} already exists.  Please try again.", newName);
                 return false;
             }
 

+ 12 - 24
OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs

@@ -222,7 +222,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
             if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene)
                 return;
 
-            m_console.Output("Throttles for {0}", null, m_udpServer.Scene.Name);
+            m_console.Output("Throttles for {0}", m_udpServer.Scene.Name);
             ConsoleDisplayList cdl = new ConsoleDisplayList();
             cdl.AddRow("Adaptive throttles", m_udpServer.ThrottleRates.AdaptiveThrottlesEnabled);
 
@@ -238,7 +238,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 
             m_console.Output(cdl.ToString());
 
-            m_console.Output("{0}\n", null, GetServerThrottlesReport(m_udpServer));
+            m_console.Output("{0}\n", GetServerThrottlesReport(m_udpServer));
         }
 
         private string GetServerThrottlesReport(LLUDPServer udpServer)
@@ -314,7 +314,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
                 {
                     MainConsole.Instance.Output(
                         "Data debug for {0} ({1}) set to {2} in {3}",
-                        null,
                         sp.Name, sp.IsChildAgent ? "child" : "root", level, m_udpServer.Scene.Name);
 
                     ((LLClientView)sp.ControllingClient).UDPClient.DebugDataOutLevel = level;
@@ -356,7 +355,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
                 {
                     MainConsole.Instance.Output(
                         "Throttle log level for {0} ({1}) set to {2} in {3}",
-                        null,
                         sp.Name, sp.IsChildAgent ? "child" : "root", level, m_udpServer.Scene.Name);
 
                     ((LLClientView)sp.ControllingClient).UDPClient.ThrottleDebugLevel = level;
@@ -403,7 +401,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
                     {
                         MainConsole.Instance.Output(
                             "Setting param {0} to {1} for {2} ({3}) in {4}",
-                            null,
                             param, newValue, sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name);
 
                         LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
@@ -427,7 +424,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
                     {
                         MainConsole.Instance.Output(
                             "Setting param {0} to {1} for {2} ({3}) in {4}",
-                            null,
                             param, newValue, sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name);
 
                         LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
@@ -449,7 +445,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
                     {
                         MainConsole.Instance.Output(
                             "Setting param {0} to {1} for {2} ({3}) in {4}",
-                            null,
                             param, newValue, sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name);
 
                         LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
@@ -489,7 +484,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
                 {
                     m_console.Output(
                         "Status for {0} ({1}) in {2}",
-                        null,
                         sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name);
 
                     LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
@@ -510,7 +504,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
             if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene)
                 return;
 
-            m_console.Output("Debug settings for {0}", null, m_udpServer.Scene.Name);
+            m_console.Output("Debug settings for {0}", m_udpServer.Scene.Name);
             ConsoleDisplayList cdl = new ConsoleDisplayList();
 
             long maxSceneDripRate = (long)m_udpServer.Throttle.MaxDripRate;
@@ -561,7 +555,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
                 return;
             }
 
-            m_console.Output("{0} set to {1} in {2}", null, param, rawValue, m_udpServer.Scene.Name);
+            m_console.Output("{0} set to {1} in {2}", param, rawValue, m_udpServer.Scene.Name);
         }
 
 /* not in use, nothing to set/get from lludp
@@ -654,7 +648,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 
                         MainConsole.Instance.Output(
                             "Packet debug for {0} clients set to {1} in {2}",
-                            null,
                             (setAll ? "all" : "future"), m_udpServer.DefaultClientPacketDebugLevel, m_udpServer.Scene.Name);
 
                         if (setAll)
@@ -663,7 +656,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
                                                        {
                                 MainConsole.Instance.Output(
                                     "Packet debug for {0} ({1}) set to {2} in {3}",
-                                    null,
                                     sp.Name, sp.IsChildAgent ? "child" : "root", newDebug, m_udpServer.Scene.Name);
 
                                 sp.ControllingClient.DebugPacketLevel = newDebug;
@@ -678,7 +670,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
                             {
                                 MainConsole.Instance.Output(
                                     "Packet debug for {0} ({1}) set to {2} in {3}",
-                                    null,
                                     sp.Name, sp.IsChildAgent ? "child" : "root", newDebug, m_udpServer.Scene.Name);
 
                                 sp.ControllingClient.DebugPacketLevel = newDebug;
@@ -712,7 +703,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
             {
                 MainConsole.Instance.Output(
                     "Adding packet {0} to {1} drop list for all connections in {2}",
-                    null,
                     direction, packetName, m_udpServer.Scene.Name);
 
                 m_udpServer.Scene.ForEachScenePresence(
@@ -731,7 +721,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
             {
                 MainConsole.Instance.Output(
                     "Removing packet {0} from {1} drop list for all connections in {2}",
-                    null,
                     direction, packetName, m_udpServer.Scene.Name);
 
                 m_udpServer.Scene.ForEachScenePresence(
@@ -805,13 +794,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
                 return;
 
             MainConsole.Instance.Output(
-                "IN  LLUDP packet processing for {0} is {1}", null, m_udpServer.Scene.Name, m_udpServer.IsRunningInbound ? "enabled" : "disabled");
+                "IN  LLUDP packet processing for {0} is {1}", m_udpServer.Scene.Name, m_udpServer.IsRunningInbound ? "enabled" : "disabled");
 
             MainConsole.Instance.Output(
-                "OUT LLUDP packet processing for {0} is {1}", null, m_udpServer.Scene.Name, m_udpServer.IsRunningOutbound ? "enabled" : "disabled");
+                "OUT LLUDP packet processing for {0} is {1}", m_udpServer.Scene.Name, m_udpServer.IsRunningOutbound ? "enabled" : "disabled");
 
             MainConsole.Instance.Output(
-                "Packet debug level for new clients is {0}", null, m_udpServer.DefaultClientPacketDebugLevel);
+                "Packet debug level for new clients is {0}", m_udpServer.DefaultClientPacketDebugLevel);
         }
 
         private void HandleOqreCommand(string module, string[] args)
@@ -830,25 +819,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
             if (subCommand == "stop")
             {
                 m_udpServer.OqrEngine.Stop();
-                MainConsole.Instance.Output("Stopped OQRE for {0}", null, m_udpServer.Scene.Name);
+                MainConsole.Instance.Output("Stopped OQRE for {0}", m_udpServer.Scene.Name);
             }
             else if (subCommand == "start")
             {
                 m_udpServer.OqrEngine.Start();
-                MainConsole.Instance.Output("Started OQRE for {0}", null, m_udpServer.Scene.Name);
+                MainConsole.Instance.Output("Started OQRE for {0}", m_udpServer.Scene.Name);
             }
             else if (subCommand == "status")
             {
-                MainConsole.Instance.Output("OQRE in {0}", null, m_udpServer.Scene.Name);
-                MainConsole.Instance.Output("Running: {0}", null, m_udpServer.OqrEngine.IsRunning);
+                MainConsole.Instance.Output("OQRE in {0}", m_udpServer.Scene.Name);
+                MainConsole.Instance.Output("Running: {0}", m_udpServer.OqrEngine.IsRunning);
                 MainConsole.Instance.Output(
                     "Requests waiting: {0}",
-                    null,
                     m_udpServer.OqrEngine.IsRunning ? m_udpServer.OqrEngine.JobsWaiting.ToString() : "n/a");
             }
             else
             {
-                MainConsole.Instance.Output("Unrecognized OQRE subcommand {0}", null, subCommand);
+                MainConsole.Instance.Output("Unrecognized OQRE subcommand {0}", subCommand);
             }
         }
     }