aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs33
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs3
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs17
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs5
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs15
6 files changed, 52 insertions, 24 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index f6ce291..b4dbeae 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -242,6 +242,14 @@ namespace OpenSim
242 + "If an avatar name is given then only packets from that avatar are logged", 242 + "If an avatar name is given then only packets from that avatar are logged",
243 Debug); 243 Debug);
244 244
245 m_console.Commands.AddCommand("region", false, "debug http",
246 "debug http <level>",
247 "Turn on inbound http request debugging for everything except the event queue (see debug eq).",
248 "If level >= 2 then the handler used to service the request is logged.\n"
249 + "If level >= 1 then incoming HTTP requests are logged.\n"
250 + "If level <= 0 then no extra http logging is done.\n",
251 Debug);
252
245 m_console.Commands.AddCommand("region", false, "debug scene", 253 m_console.Commands.AddCommand("region", false, "debug scene",
246 "debug scene <cripting> <collisions> <physics>", 254 "debug scene <cripting> <collisions> <physics>",
247 "Turn on scene debugging", Debug); 255 "Turn on scene debugging", Debug);
@@ -337,7 +345,7 @@ namespace OpenSim
337 345
338 m_console.Commands.AddCommand("region", false, "backup", 346 m_console.Commands.AddCommand("region", false, "backup",
339 "backup", 347 "backup",
340 "Persist objects to the database now", RunCommand); 348 "Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.", RunCommand);
341 349
342 m_console.Commands.AddCommand("region", false, "create region", 350 m_console.Commands.AddCommand("region", false, "create region",
343 "create region [\"region name\"] <region_file.ini>", 351 "create region [\"region name\"] <region_file.ini>",
@@ -886,13 +894,30 @@ namespace OpenSim
886 if (int.TryParse(args[2], out newDebug)) 894 if (int.TryParse(args[2], out newDebug))
887 { 895 {
888 m_sceneManager.SetDebugPacketLevelOnCurrentScene(newDebug, name); 896 m_sceneManager.SetDebugPacketLevelOnCurrentScene(newDebug, name);
897 // We provide user information elsewhere if any clients had their debug level set.
898// MainConsole.Instance.OutputFormat("Debug packet level set to {0}", newDebug);
889 } 899 }
890 else 900 else
891 { 901 {
892 MainConsole.Instance.Output("packet debug should be 0..255"); 902 MainConsole.Instance.Output("Usage: debug packet 0..255");
903 }
904 }
905
906 break;
907
908 case "http":
909 if (args.Length == 3)
910 {
911 int newDebug;
912 if (int.TryParse(args[2], out newDebug))
913 {
914 MainServer.Instance.DebugLevel = newDebug;
915 MainConsole.Instance.OutputFormat("Debug http level set to {0}", newDebug);
916 break;
893 } 917 }
894 } 918 }
895 919
920 MainConsole.Instance.Output("Usage: debug http 0..2");
896 break; 921 break;
897 922
898 case "scene": 923 case "scene":
@@ -917,13 +942,13 @@ namespace OpenSim
917 } 942 }
918 else 943 else
919 { 944 {
920 MainConsole.Instance.Output("debug scene <scripting> <collisions> <physics> (where inside <> is true/false)"); 945 MainConsole.Instance.Output("Usage: debug scene <scripting> <collisions> <physics> (where inside <> is true/false)");
921 } 946 }
922 947
923 break; 948 break;
924 949
925 default: 950 default:
926 MainConsole.Instance.Output("Unknown debug"); 951 MainConsole.Instance.Output("Unknown debug command");
927 break; 952 break;
928 } 953 }
929 } 954 }
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 8f0ae76..07b4df3 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -238,7 +238,8 @@ namespace OpenSim.Region.ClientStack.Linden
238 return string.Empty; 238 return string.Empty;
239 } 239 }
240 240
241 Hashtable caps = m_HostCapsObj.CapsHandlers.CapsDetails; 241 Hashtable caps = m_HostCapsObj.CapsHandlers.GetCapsDetails(true);
242
242 // Add the external too 243 // Add the external too
243 foreach (KeyValuePair<string, string> kvp in m_HostCapsObj.ExternalCapsHandlers) 244 foreach (KeyValuePair<string, string> kvp in m_HostCapsObj.ExternalCapsHandlers)
244 caps[kvp.Key] = kvp.Value; 245 caps[kvp.Key] = kvp.Value;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
index 5c721d4..9f27abc 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
@@ -110,8 +110,9 @@ namespace OpenSim.Region.ClientStack.Linden
110 false, 110 false,
111 "debug eq", 111 "debug eq",
112 "debug eq [0|1]", 112 "debug eq [0|1]",
113 "Turn on event queue debugging",
113 "debug eq 1 will turn on event queue debugging. This will log all outgoing event queue messages to clients.\n" 114 "debug eq 1 will turn on event queue debugging. This will log all outgoing event queue messages to clients.\n"
114 + "debug eq 1 will turn off event queue debugging.", 115 + "debug eq 0 will turn off event queue debugging.",
115 HandleDebugEq); 116 HandleDebugEq);
116 } 117 }
117 else 118 else
diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
index babeaab..97cd738 100644
--- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using System.Text;
32using log4net; 33using log4net;
33using Nini.Config; 34using Nini.Config;
34using Mono.Addins; 35using Mono.Addins;
@@ -46,6 +47,8 @@ namespace OpenSim.Region.CoreModules.Framework
46 public class CapabilitiesModule : INonSharedRegionModule, ICapabilitiesModule 47 public class CapabilitiesModule : INonSharedRegionModule, ICapabilitiesModule
47 { 48 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50
51 private string m_showCapsCommandFormat = " {0,-38} {1,-60}\n";
49 52
50 protected Scene m_scene; 53 protected Scene m_scene;
51 54
@@ -68,7 +71,7 @@ namespace OpenSim.Region.CoreModules.Framework
68 m_scene.RegisterModuleInterface<ICapabilitiesModule>(this); 71 m_scene.RegisterModuleInterface<ICapabilitiesModule>(this);
69 MainConsole.Instance.Commands.AddCommand("Capabilities", false, "show caps", 72 MainConsole.Instance.Commands.AddCommand("Capabilities", false, "show caps",
70 "show caps", 73 "show caps",
71 "Shows all registered capabilities", CapabilitiesCommand); 74 "Shows all registered capabilities", HandleShowCapsCommand);
72 } 75 }
73 76
74 public void RegionLoaded(Scene scene) 77 public void RegionLoaded(Scene scene)
@@ -228,21 +231,23 @@ namespace OpenSim.Region.CoreModules.Framework
228 } 231 }
229 } 232 }
230 233
231 private void CapabilitiesCommand(string module, string[] cmdparams) 234 private void HandleShowCapsCommand(string module, string[] cmdparams)
232 { 235 {
233 System.Text.StringBuilder caps = new System.Text.StringBuilder(); 236 StringBuilder caps = new StringBuilder();
234 caps.AppendFormat("Region {0}:\n", m_scene.RegionInfo.RegionName); 237 caps.AppendFormat("Region {0}:\n", m_scene.RegionInfo.RegionName);
235 238
236 foreach (KeyValuePair<UUID, Caps> kvp in m_capsObjects) 239 foreach (KeyValuePair<UUID, Caps> kvp in m_capsObjects)
237 { 240 {
238 caps.AppendFormat("** User {0}:\n", kvp.Key); 241 caps.AppendFormat("** User {0}:\n", kvp.Key);
239 for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.CapsDetails.GetEnumerator(); kvp2.MoveNext(); ) 242
243 for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.GetCapsDetails(false).GetEnumerator(); kvp2.MoveNext(); )
240 { 244 {
241 Uri uri = new Uri(kvp2.Value.ToString()); 245 Uri uri = new Uri(kvp2.Value.ToString());
242 caps.AppendFormat(" {0} = {1}\n", kvp2.Key, uri.PathAndQuery); 246 caps.AppendFormat(m_showCapsCommandFormat, kvp2.Key, uri.PathAndQuery);
243 } 247 }
248
244 foreach (KeyValuePair<string, string> kvp3 in kvp.Value.ExternalCapsHandlers) 249 foreach (KeyValuePair<string, string> kvp3 in kvp.Value.ExternalCapsHandlers)
245 caps.AppendFormat(" {0} = {1}\n", kvp3.Key, kvp3.Value); 250 caps.AppendFormat(m_showCapsCommandFormat, kvp3.Key, kvp3.Value);
246 } 251 }
247 252
248 MainConsole.Instance.Output(caps.ToString()); 253 MainConsole.Instance.Output(caps.ToString());
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 3963474..c1b8764 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -218,9 +218,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
218 218
219 m_scene.AddCommand(this, "debug permissions", 219 m_scene.AddCommand(this, "debug permissions",
220 "debug permissions <true / false>", 220 "debug permissions <true / false>",
221 "Enable permissions debugging", 221 "Turn on permissions debugging",
222 HandleDebugPermissions); 222 HandleDebugPermissions);
223
224 223
225 string grant = myConfig.GetString("GrantLSL",""); 224 string grant = myConfig.GetString("GrantLSL","");
226 if (grant.Length > 0) { 225 if (grant.Length > 0) {
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index 53d5e4c..f15e81b 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -171,16 +171,13 @@ namespace OpenSim.Region.Physics.Meshing
171 171
172 foreach (Vector3 v in meshIn.getVertexList()) 172 foreach (Vector3 v in meshIn.getVertexList())
173 { 173 {
174 if (v != null) 174 if (v.X < minX) minX = v.X;
175 { 175 if (v.Y < minY) minY = v.Y;
176 if (v.X < minX) minX = v.X; 176 if (v.Z < minZ) minZ = v.Z;
177 if (v.Y < minY) minY = v.Y;
178 if (v.Z < minZ) minZ = v.Z;
179 177
180 if (v.X > maxX) maxX = v.X; 178 if (v.X > maxX) maxX = v.X;
181 if (v.Y > maxY) maxY = v.Y; 179 if (v.Y > maxY) maxY = v.Y;
182 if (v.Z > maxZ) maxZ = v.Z; 180 if (v.Z > maxZ) maxZ = v.Z;
183 }
184 } 181 }
185 182
186 return CreateSimpleBoxMesh(minX, maxX, minY, maxY, minZ, maxZ); 183 return CreateSimpleBoxMesh(minX, maxX, minY, maxY, minZ, maxZ);