remove some more useless NULL arguments

0.9.1.0-post-fixes
UbitUmarov 2019-10-22 12:39:50 +01:00
parent b98ad6c53c
commit da0a8d6c43
17 changed files with 45 additions and 52 deletions

View File

@ -124,7 +124,7 @@ namespace OpenSim.Framework.Monitoring
SortedDictionary<string, SortedDictionary<string, Stat>> category; SortedDictionary<string, SortedDictionary<string, Stat>> category;
if (!RegisteredStats.TryGetValue(categoryName, out category)) if (!RegisteredStats.TryGetValue(categoryName, out category))
{ {
con.Output("No such category as {0}", null, categoryName); con.Output("No such category as {0}", categoryName);
} }
else else
{ {
@ -151,13 +151,13 @@ namespace OpenSim.Framework.Monitoring
else else
{ {
con.Output( con.Output(
"No such stat {0} in {1}.{2}", null, statName, categoryName, containerName); "No such stat {0} in {1}.{2}", statName, categoryName, containerName);
} }
} }
} }
else else
{ {
con.Output("No such container {0} in category {1}", null, containerName, categoryName); con.Output("No such container {0} in category {1}", containerName, categoryName);
} }
} }
} }

View File

@ -198,7 +198,7 @@ namespace OpenSim.Framework.Servers
if (newDebug < 0 || newDebug > 6) if (newDebug < 0 || newDebug > 6)
{ {
MainConsole.Instance.Output("{0} is outside the valid debug level range of 0..6", null, newDebug); MainConsole.Instance.Output("{0} is outside the valid debug level range of 0..6", newDebug);
return; return;
} }

View File

@ -498,7 +498,7 @@ namespace OpenSim.Framework.Servers
if (newLevel < 0 || newLevel > Util.MAX_THREADPOOL_LEVEL) if (newLevel < 0 || newLevel > Util.MAX_THREADPOOL_LEVEL)
{ {
MainConsole.Instance.Output("{0} is outside the valid debug level range of 0.." + Util.MAX_THREADPOOL_LEVEL, null, newLevel); MainConsole.Instance.Output("{0} is outside the valid debug level range of 0.." + Util.MAX_THREADPOOL_LEVEL, newLevel);
return; return;
} }

View File

@ -1075,14 +1075,14 @@ namespace OpenSim.Region.CoreModules.Asset
{ {
case "status": case "status":
if (m_MemoryCacheEnabled) if (m_MemoryCacheEnabled)
con.Output("Memory Cache: {0} assets", null, m_MemoryCache.Count); con.Output("Memory Cache: {0} assets", m_MemoryCache.Count);
else else
con.Output("Memory cache disabled"); con.Output("Memory cache disabled");
if (m_FileCacheEnabled) if (m_FileCacheEnabled)
{ {
int fileCount = GetFileCacheCount(m_CacheDirectory); int fileCount = GetFileCacheCount(m_CacheDirectory);
con.Output("File Cache: {0} assets", null, fileCount); con.Output("File Cache: {0} assets", fileCount);
} }
else else
{ {
@ -1099,7 +1099,7 @@ namespace OpenSim.Region.CoreModules.Asset
{ {
string RegionID = s.Remove(0,s.IndexOf("_")).Replace(".fac",""); string RegionID = s.Remove(0,s.IndexOf("_")).Replace(".fac","");
DateTime RegionDeepScanTMStamp = File.GetLastWriteTime(s); DateTime RegionDeepScanTMStamp = File.GetLastWriteTime(s);
con.Output("Region: {0}, {1}", null, RegionID, RegionDeepScanTMStamp.ToString("MM/dd/yyyy hh:mm:ss")); con.Output("Region: {0}, {1}", RegionID, RegionDeepScanTMStamp.ToString("MM/dd/yyyy hh:mm:ss"));
} }
} }
@ -1192,7 +1192,7 @@ namespace OpenSim.Region.CoreModules.Asset
} }
m_cleanupRunning = false; m_cleanupRunning = false;
} }
con.Output("Completed check with {0} assets.", null, assetReferenceTotal); con.Output("Completed check with {0} assets.", assetReferenceTotal);
}, null, "TouchAllSceneAssets", false); }, null, "TouchAllSceneAssets", false);
break; break;
@ -1218,7 +1218,7 @@ namespace OpenSim.Region.CoreModules.Asset
if (!DateTime.TryParse(s_expirationDate, out expirationDate)) if (!DateTime.TryParse(s_expirationDate, out expirationDate))
{ {
con.Output("{0} is not a valid date & time", null, cmd); con.Output("{0} is not a valid date & time", cmd);
break; break;
} }
@ -1229,7 +1229,7 @@ namespace OpenSim.Region.CoreModules.Asset
break; break;
default: default:
con.Output("Unknown command {0}", null, cmd); con.Output("Unknown command {0}", cmd);
break; break;
} }
} }

View File

@ -165,14 +165,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
{ {
DebugLevel = debugLevel; DebugLevel = debugLevel;
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Set attachments debug level to {0} in {1}", null, DebugLevel, m_scene.Name); "Set attachments debug level to {0} in {1}", DebugLevel, m_scene.Name);
} }
} }
private void HandleDebugAttachmentsStatus(string module, string[] args) private void HandleDebugAttachmentsStatus(string module, string[] args)
{ {
MainConsole.Instance.Output("Settings for {0}", null, m_scene.Name); MainConsole.Instance.Output("Settings for {0}", m_scene.Name);
MainConsole.Instance.Output("Debug logging level: {0}", null, DebugLevel); MainConsole.Instance.Output("Debug logging level: {0}", DebugLevel);
} }
protected void HandleShowAttachmentsCommand(string module, string[] cmd) protected void HandleShowAttachmentsCommand(string module, string[] cmd)

View File

@ -295,7 +295,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
{ {
Primitive.TextureEntryFace bakedTextureFace = bakedTextures[bakeType]; Primitive.TextureEntryFace bakedTextureFace = bakedTextures[bakeType];
if (bakedTextureFace == null) if (bakedTextureFace == null || bakedTextureFace.TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE)
continue; continue;
AssetBase asset; AssetBase asset;

View File

@ -147,7 +147,7 @@ namespace OpenSim.Region.CoreModules.Avatars.Commands
if (user == null) if (user == null)
{ {
MainConsole.Instance.Output("No user found with name {0} {1}", null, firstName, lastName); MainConsole.Instance.Output("No user found with name {0} {1}", firstName, lastName);
return; return;
} }
@ -161,7 +161,7 @@ namespace OpenSim.Region.CoreModules.Avatars.Commands
if (!m.Success) if (!m.Success)
{ {
MainConsole.Instance.Output("Invalid destination {0}", null, rawDestination); MainConsole.Instance.Output("Invalid destination {0}", rawDestination);
return; return;
} }
} }
@ -171,7 +171,6 @@ namespace OpenSim.Region.CoreModules.Avatars.Commands
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Teleporting {0} to {1},{2},{3} in {4}", "Teleporting {0} to {1},{2},{3} in {4}",
null,
user.Name, user.Name,
m.Groups["x"], m.Groups["y"], m.Groups["z"], m.Groups["x"], m.Groups["y"], m.Groups["z"],
regionName); regionName);

View File

@ -318,7 +318,6 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
{ {
MainConsole.Instance.Output( MainConsole.Instance.Output(
"[MONITOR MODULE]: {0} reports {1} = {2}", "[MONITOR MODULE]: {0} reports {1} = {2}",
null,
m_scene.RegionInfo.RegionName, monitor.GetFriendlyName(), monitor.GetFriendlyValue()); m_scene.RegionInfo.RegionName, monitor.GetFriendlyName(), monitor.GetFriendlyValue());
} }
@ -326,7 +325,6 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
{ {
MainConsole.Instance.Output( MainConsole.Instance.Output(
"[MONITOR MODULE]: {0} reports {1} = {2}", "[MONITOR MODULE]: {0} reports {1} = {2}",
null,
m_scene.RegionInfo.RegionName, tuple.Key, tuple.Value); m_scene.RegionInfo.RegionName, tuple.Key, tuple.Value);
} }
} }

View File

@ -1040,7 +1040,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
if(!GetUser(userId, out ud)) if(!GetUser(userId, out ud))
{ {
MainConsole.Instance.Output("No name known for user with id {0}", null, userId); MainConsole.Instance.Output("No name known for user with id {0}", userId);
return; return;
} }

View File

@ -2536,11 +2536,11 @@ namespace OpenSim.Region.CoreModules.World.Land
if (response.ToLower() == "y") if (response.ToLower() == "y")
{ {
Clear(true); Clear(true);
MainConsole.Instance.Output("Cleared all parcels from {0}", null, m_scene.Name); MainConsole.Instance.Output("Cleared all parcels from {0}", m_scene.Name);
} }
else else
{ {
MainConsole.Instance.Output("Aborting clear of all parcels from {0}", null, m_scene.Name); MainConsole.Instance.Output("Aborting clear of all parcels from {0}", m_scene.Name);
} }
} }
@ -2568,7 +2568,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
if (!m_landList.TryGetValue(landLocalId, out lo)) if (!m_landList.TryGetValue(landLocalId, out lo))
{ {
MainConsole.Instance.Output("No parcel found with local ID {0}", null, landLocalId); MainConsole.Instance.Output("No parcel found with local ID {0}", landLocalId);
return; return;
} }
} }

View File

@ -287,7 +287,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
protected void SetPartMediaFlags(SceneObjectPart part, int face, bool flag) protected void SetPartMediaFlags(SceneObjectPart part, int face, bool flag)
{ {
Primitive.TextureEntry te = part.Shape.Textures; Primitive.TextureEntry te = part.Shape.Textures;
Primitive.TextureEntryFace teFace = te.CreateFace((uint)face); Primitive.TextureEntryFace teFace = te.GetFace((uint)face);
teFace.MediaFlags = flag; teFace.MediaFlags = flag;
part.Shape.Textures = te; part.Shape.Textures = te;
} }

View File

@ -451,7 +451,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
if (!ConsoleUtil.TryParseConsoleMinVector(rawConsoleStartVector, out startVector)) if (!ConsoleUtil.TryParseConsoleMinVector(rawConsoleStartVector, out startVector))
{ {
m_console.Output("Error: Start vector '{0}' does not have a valid format", null, rawConsoleStartVector); m_console.Output("Error: Start vector '{0}' does not have a valid format", rawConsoleStartVector);
return; return;
} }
@ -460,7 +460,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector)) if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector))
{ {
m_console.Output("Error: End vector '{0}' does not have a valid format", null, rawConsoleEndVector); m_console.Output("Error: End vector '{0}' does not have a valid format", rawConsoleEndVector);
return; return;
} }
@ -809,7 +809,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
if(so.IsAttachment) if(so.IsAttachment)
{ {
requireConfirmation = true; requireConfirmation = true;
m_console.Output("Warning: object with uuid {0} is a attachment", null, uuid); m_console.Output("Warning: object with uuid {0} is a attachment", uuid);
} }
} }
break; break;
@ -853,7 +853,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
break; break;
default: default:
m_console.Output("Unrecognized mode {0}", null, mode); m_console.Output("Unrecognized mode {0}", mode);
return; return;
} }
@ -871,17 +871,17 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
if (response.ToLower() != "y") if (response.ToLower() != "y")
{ {
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Aborting delete of {0} objects from {1}", null, deletes.Count, m_scene.RegionInfo.RegionName); "Aborting delete of {0} objects from {1}", deletes.Count, m_scene.RegionInfo.RegionName);
return; return;
} }
} }
m_console.Output("Deleting {0} objects in {1}", null, deletes.Count, m_scene.RegionInfo.RegionName); m_console.Output("Deleting {0} objects in {1}", deletes.Count, m_scene.RegionInfo.RegionName);
foreach (SceneObjectGroup g in deletes) foreach (SceneObjectGroup g in deletes)
{ {
m_console.Output("Deleting object {0} {1}", null, g.UUID, g.Name); m_console.Output("Deleting object {0} {1}", g.UUID, g.Name);
m_scene.DeleteSceneObject(g, false); m_scene.DeleteSceneObject(g, false);
} }
} }

View File

@ -226,7 +226,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
{ {
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Cannot set {0} to {1} in {2} as max-agent-limit is {3}", "agent-limit", "Cannot set {0} to {1} in {2} as max-agent-limit is {3}", "agent-limit",
null,
newValue, m_scene.Name, ri.AgentCapacity); newValue, m_scene.Name, ri.AgentCapacity);
} }
else else
@ -234,7 +233,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
rs.AgentLimit = newValue; rs.AgentLimit = newValue;
MainConsole.Instance.Output( MainConsole.Instance.Output(
"{0} set to {1} in {2}", "agent-limit", null, newValue, m_scene.Name); "{0} set to {1} in {2}", "agent-limit", newValue, m_scene.Name);
} }
rs.Save(); rs.Save();
@ -249,14 +248,14 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
ri.AgentCapacity = newValue; ri.AgentCapacity = newValue;
MainConsole.Instance.Output( MainConsole.Instance.Output(
"{0} set to {1} in {2}", "max-agent-limit", null, newValue, m_scene.Name); "max-agent-limit set to {0} in {1}", newValue, m_scene.Name);
if (ri.AgentCapacity < rs.AgentLimit) if (ri.AgentCapacity < rs.AgentLimit)
{ {
rs.AgentLimit = ri.AgentCapacity; rs.AgentLimit = ri.AgentCapacity;
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Reducing {0} to {1} in {2}", null, "agent-limit", rs.AgentLimit, m_scene.Name); "agent-limit set to {0} in {1}", rs.AgentLimit, m_scene.Name);
} }
rs.Save(); rs.Save();

View File

@ -338,7 +338,7 @@ namespace OpenSim.Region.CoreModules.World.Region
times.Add(Convert.ToInt32(args[i])); times.Add(Convert.ToInt32(args[i]));
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Region {0} scheduled for restart in {1} seconds", null, m_Scene.Name, times.Sum()); "Region {0} scheduled for restart in {1} seconds", m_Scene.Name, times.Sum());
ScheduleRestart(UUID.Zero, args[3], times.ToArray(), notice); ScheduleRestart(UUID.Zero, args[3], times.ToArray(), notice);
} }

View File

@ -793,7 +793,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain
{ {
MainConsole.Instance.Output( MainConsole.Instance.Output(
"ERROR: file width + minimum X tile and file height + minimum Y tile must incorporate the current region at ({0},{1}). File width {2} from {3} and file height {4} from {5} does not.", "ERROR: file width + minimum X tile and file height + minimum Y tile must incorporate the current region at ({0},{1}). File width {2} from {3} and file height {4} from {5} does not.",
null,
m_scene.RegionInfo.RegionLocX, m_scene.RegionInfo.RegionLocY, fileWidth, fileStartX, fileHeight, fileStartY); m_scene.RegionInfo.RegionLocX, m_scene.RegionInfo.RegionLocY, fileWidth, fileStartX, fileHeight, fileStartY);
return; return;
@ -813,7 +812,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Saved terrain from ({0},{1}) to ({2},{3}) from {4} to {5}", "Saved terrain from ({0},{1}) to ({2},{3}) from {4} to {5}",
null,
fileStartX, fileStartY, fileStartX + fileWidth - 1, fileStartY + fileHeight - 1, fileStartX, fileStartY, fileStartX + fileWidth - 1, fileStartY + fileHeight - 1,
m_scene.RegionInfo.RegionName, filename); m_scene.RegionInfo.RegionName, filename);
} }
@ -824,7 +822,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain
MainConsole.Instance.Output( MainConsole.Instance.Output(
"ERROR: Could not save terrain from {0} to {1}. Valid file extensions are {2}", "ERROR: Could not save terrain from {0} to {1}. Valid file extensions are {2}",
null,
m_scene.RegionInfo.RegionName, filename, m_supportFileExtensionsForTileSave); m_scene.RegionInfo.RegionName, filename, m_supportFileExtensionsForTileSave);
} }
@ -1706,8 +1703,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
double avg = sum / (m_channel.Height * m_channel.Width); double avg = sum / (m_channel.Height * m_channel.Width);
MainConsole.Instance.Output("Channel {0}x{1}", null, m_channel.Width, m_channel.Height); MainConsole.Instance.Output("Channel {0}x{1}", m_channel.Width, m_channel.Height);
MainConsole.Instance.Output("max/min/avg/sum: {0}/{1}/{2}/{3}", null, max, min, avg, sum); MainConsole.Instance.Output("max/min/avg/sum: {0}/{1}/{2}/{3}", max, min, avg, sum);
} }
private void InterfaceEnableExperimentalBrushes(Object[] args) private void InterfaceEnableExperimentalBrushes(Object[] args)

View File

@ -265,7 +265,7 @@ namespace OpenSim.Region.CoreModules
else else
{ {
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Invalid value {0} specified for {1}", null, cmdparams[3], cmdparams[2]); "Invalid value {0} specified for {1}", cmdparams[3], cmdparams[2]);
return; return;
} }
@ -276,7 +276,7 @@ namespace OpenSim.Region.CoreModules
if (desiredPlugin.Equals(m_activeWindPlugin.Name)) if (desiredPlugin.Equals(m_activeWindPlugin.Name))
{ {
MainConsole.Instance.Output("Wind model plugin {0} is already active", null, cmdparams[3]); MainConsole.Instance.Output("Wind model plugin {0} is already active", cmdparams[3]);
return; return;
} }
@ -285,11 +285,11 @@ namespace OpenSim.Region.CoreModules
{ {
m_activeWindPlugin = m_availableWindPlugins[cmdparams[3]]; m_activeWindPlugin = m_availableWindPlugins[cmdparams[3]];
MainConsole.Instance.Output("{0} wind model plugin now active", null, m_activeWindPlugin.Name); MainConsole.Instance.Output("{0} wind model plugin now active", m_activeWindPlugin.Name);
} }
else else
{ {
MainConsole.Instance.Output("Could not find wind model plugin {0}", null, desiredPlugin); MainConsole.Instance.Output("Could not find wind model plugin {0}", desiredPlugin);
} }
break; break;
} }
@ -317,17 +317,17 @@ namespace OpenSim.Region.CoreModules
{ {
if (!float.TryParse(cmdparams[3], out value)) if (!float.TryParse(cmdparams[3], out value))
{ {
MainConsole.Instance.Output("Invalid value {0}", null, cmdparams[3]); MainConsole.Instance.Output("Invalid value {0}", cmdparams[3]);
} }
try try
{ {
WindParamSet(plugin, param, value); WindParamSet(plugin, param, value);
MainConsole.Instance.Output("{0} set to {1}", null, param, value); MainConsole.Instance.Output("{0} set to {1}", param, value);
} }
catch (Exception e) catch (Exception e)
{ {
MainConsole.Instance.Output("{0}", null, e.Message); MainConsole.Instance.Output("{0}", e.Message);
} }
} }
else else
@ -335,11 +335,11 @@ namespace OpenSim.Region.CoreModules
try try
{ {
value = WindParamGet(plugin, param); value = WindParamGet(plugin, param);
MainConsole.Instance.Output("{0} : {1}", null, param, value); MainConsole.Instance.Output("{0} : {1}", param, value);
} }
catch (Exception e) catch (Exception e)
{ {
MainConsole.Instance.Output("{0}", null, e.Message); MainConsole.Instance.Output("{0}", e.Message);
} }
} }