diff options
author | Melanie | 2011-12-01 12:16:59 +0000 |
---|---|---|
committer | Melanie | 2011-12-01 12:16:59 +0000 |
commit | b60ff651a3912f7d7830cac40752218efba858d8 (patch) | |
tree | ba22de2341b996cfeb1f7da31f650e206cb1d76f | |
parent | Merge branch 'master' into bigmerge (diff) | |
parent | Provide more user feedback when "debug http" is set (diff) | |
download | opensim-SC_OLD-b60ff651a3912f7d7830cac40752218efba858d8.zip opensim-SC_OLD-b60ff651a3912f7d7830cac40752218efba858d8.tar.gz opensim-SC_OLD-b60ff651a3912f7d7830cac40752218efba858d8.tar.bz2 opensim-SC_OLD-b60ff651a3912f7d7830cac40752218efba858d8.tar.xz |
Merge branch 'master' into bigmerge
Diffstat (limited to '')
8 files changed, 115 insertions, 54 deletions
diff --git a/OpenSim/Capabilities/CapsHandlers.cs b/OpenSim/Capabilities/CapsHandlers.cs index e1c800e..a0e9ebc 100644 --- a/OpenSim/Capabilities/CapsHandlers.cs +++ b/OpenSim/Capabilities/CapsHandlers.cs | |||
@@ -147,25 +147,25 @@ namespace OpenSim.Framework.Capabilities | |||
147 | /// Return an LLSD-serializable Hashtable describing the | 147 | /// Return an LLSD-serializable Hashtable describing the |
148 | /// capabilities and their handler details. | 148 | /// capabilities and their handler details. |
149 | /// </summary> | 149 | /// </summary> |
150 | public Hashtable CapsDetails | 150 | /// <param name="excludeSeed">If true, then exclude the seed cap.</param> |
151 | public Hashtable GetCapsDetails(bool excludeSeed) | ||
151 | { | 152 | { |
152 | get | 153 | Hashtable caps = new Hashtable(); |
154 | string protocol = "http://"; | ||
155 | |||
156 | if (m_useSSL) | ||
157 | protocol = "https://"; | ||
158 | |||
159 | string baseUrl = protocol + m_httpListenerHostName + ":" + m_httpListenerPort.ToString(); | ||
160 | foreach (string capsName in m_capsHandlers.Keys) | ||
153 | { | 161 | { |
154 | Hashtable caps = new Hashtable(); | 162 | if (excludeSeed && "SEED" == capsName) |
155 | string protocol = "http://"; | 163 | continue; |
156 | |||
157 | if (m_useSSL) | ||
158 | protocol = "https://"; | ||
159 | 164 | ||
160 | string baseUrl = protocol + m_httpListenerHostName + ":" + m_httpListenerPort.ToString(); | 165 | caps[capsName] = baseUrl + m_capsHandlers[capsName].Path; |
161 | foreach (string capsName in m_capsHandlers.Keys) | ||
162 | { | ||
163 | // skip SEED cap | ||
164 | if ("SEED" == capsName) continue; | ||
165 | caps[capsName] = baseUrl + m_capsHandlers[capsName].Path; | ||
166 | } | ||
167 | return caps; | ||
168 | } | 166 | } |
167 | |||
168 | return caps; | ||
169 | } | 169 | } |
170 | } | 170 | } |
171 | } | 171 | } |
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index b45ed7b..04739fe 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -79,6 +79,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
79 | 79 | ||
80 | private PollServiceRequestManager m_PollServiceManager; | 80 | private PollServiceRequestManager m_PollServiceManager; |
81 | 81 | ||
82 | /// <summary> | ||
83 | /// Control the printing of certain debug messages. | ||
84 | /// </summary> | ||
85 | public int DebugLevel { get; set; } | ||
86 | |||
82 | public uint SSLPort | 87 | public uint SSLPort |
83 | { | 88 | { |
84 | get { return m_sslport; } | 89 | get { return m_sslport; } |
@@ -442,17 +447,18 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
442 | string path = request.RawUrl; | 447 | string path = request.RawUrl; |
443 | string handlerKey = GetHandlerKey(request.HttpMethod, path); | 448 | string handlerKey = GetHandlerKey(request.HttpMethod, path); |
444 | 449 | ||
445 | // m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); | ||
446 | |||
447 | if (TryGetStreamHandler(handlerKey, out requestHandler)) | 450 | if (TryGetStreamHandler(handlerKey, out requestHandler)) |
448 | { | 451 | { |
449 | //m_log.Debug("[BASE HTTP SERVER]: Found Stream Handler"); | 452 | if (DebugLevel >= 1) |
453 | m_log.DebugFormat( | ||
454 | "[BASE HTTP SERVER]: Found stream handler for {0} {1}", | ||
455 | request.HttpMethod, request.Url.PathAndQuery); | ||
456 | |||
450 | // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler. | 457 | // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler. |
451 | byte[] buffer = null; | 458 | byte[] buffer = null; |
452 | 459 | ||
453 | response.ContentType = requestHandler.ContentType; // Lets do this defaulting before in case handler has varying content type. | 460 | response.ContentType = requestHandler.ContentType; // Lets do this defaulting before in case handler has varying content type. |
454 | 461 | ||
455 | |||
456 | if (requestHandler is IStreamedRequestHandler) | 462 | if (requestHandler is IStreamedRequestHandler) |
457 | { | 463 | { |
458 | IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler; | 464 | IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler; |
@@ -480,7 +486,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
480 | string[] querystringkeys = request.QueryString.AllKeys; | 486 | string[] querystringkeys = request.QueryString.AllKeys; |
481 | string[] rHeaders = request.Headers.AllKeys; | 487 | string[] rHeaders = request.Headers.AllKeys; |
482 | 488 | ||
483 | |||
484 | foreach (string queryname in querystringkeys) | 489 | foreach (string queryname in querystringkeys) |
485 | { | 490 | { |
486 | keysvals.Add(queryname, request.QueryString[queryname]); | 491 | keysvals.Add(queryname, request.QueryString[queryname]); |
@@ -556,6 +561,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
556 | { | 561 | { |
557 | m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message); | 562 | m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message); |
558 | } | 563 | } |
564 | |||
559 | return; | 565 | return; |
560 | } | 566 | } |
561 | 567 | ||
@@ -566,7 +572,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
566 | if (strAccept.Contains("application/llsd+xml") || | 572 | if (strAccept.Contains("application/llsd+xml") || |
567 | strAccept.Contains("application/llsd+json")) | 573 | strAccept.Contains("application/llsd+json")) |
568 | { | 574 | { |
569 | //m_log.Info("[Debug BASE HTTP SERVER]: Found an application/llsd+xml accept header"); | 575 | if (DebugLevel >= 1) |
576 | m_log.DebugFormat( | ||
577 | "[BASE HTTP SERVER]: Found application/llsd+xml accept header handler for {0} {1}", | ||
578 | request.HttpMethod, request.Url.PathAndQuery); | ||
579 | |||
570 | HandleLLSDRequests(request, response); | 580 | HandleLLSDRequests(request, response); |
571 | return; | 581 | return; |
572 | } | 582 | } |
@@ -577,15 +587,24 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
577 | { | 587 | { |
578 | case null: | 588 | case null: |
579 | case "text/html": | 589 | case "text/html": |
580 | // m_log.DebugFormat( | 590 | |
581 | // "[BASE HTTP SERVER]: Found a text/html content type for request {0}", request.RawUrl); | 591 | if (DebugLevel >= 1) |
592 | m_log.DebugFormat( | ||
593 | "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", | ||
594 | request.ContentType, request.HttpMethod, request.Url.PathAndQuery); | ||
595 | |||
582 | HandleHTTPRequest(request, response); | 596 | HandleHTTPRequest(request, response); |
583 | return; | 597 | return; |
584 | 598 | ||
585 | case "application/llsd+xml": | 599 | case "application/llsd+xml": |
586 | case "application/xml+llsd": | 600 | case "application/xml+llsd": |
587 | case "application/llsd+json": | 601 | case "application/llsd+json": |
588 | //m_log.Info("[Debug BASE HTTP SERVER]: found a application/llsd+xml content type"); | 602 | |
603 | if (DebugLevel >= 1) | ||
604 | m_log.DebugFormat( | ||
605 | "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", | ||
606 | request.ContentType, request.HttpMethod, request.Url.PathAndQuery); | ||
607 | |||
589 | HandleLLSDRequests(request, response); | 608 | HandleLLSDRequests(request, response); |
590 | return; | 609 | return; |
591 | 610 | ||
@@ -602,7 +621,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
602 | //m_log.Info("[Debug BASE HTTP SERVER]: Checking for LLSD Handler"); | 621 | //m_log.Info("[Debug BASE HTTP SERVER]: Checking for LLSD Handler"); |
603 | if (DoWeHaveALLSDHandler(request.RawUrl)) | 622 | if (DoWeHaveALLSDHandler(request.RawUrl)) |
604 | { | 623 | { |
605 | //m_log.Info("[Debug BASE HTTP SERVER]: Found LLSD Handler"); | 624 | if (DebugLevel >= 1) |
625 | m_log.DebugFormat( | ||
626 | "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", | ||
627 | request.ContentType, request.HttpMethod, request.Url.PathAndQuery); | ||
628 | |||
606 | HandleLLSDRequests(request, response); | 629 | HandleLLSDRequests(request, response); |
607 | return; | 630 | return; |
608 | } | 631 | } |
@@ -610,12 +633,20 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
610 | // m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl); | 633 | // m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl); |
611 | if (DoWeHaveAHTTPHandler(request.RawUrl)) | 634 | if (DoWeHaveAHTTPHandler(request.RawUrl)) |
612 | { | 635 | { |
613 | // m_log.DebugFormat("[BASE HTTP SERVER]: Found HTTP Handler for request {0}", request.RawUrl); | 636 | if (DebugLevel >= 1) |
637 | m_log.DebugFormat( | ||
638 | "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", | ||
639 | request.ContentType, request.HttpMethod, request.Url.PathAndQuery); | ||
640 | |||
614 | HandleHTTPRequest(request, response); | 641 | HandleHTTPRequest(request, response); |
615 | return; | 642 | return; |
616 | } | 643 | } |
617 | 644 | ||
618 | //m_log.Info("[Debug BASE HTTP SERVER]: Generic XMLRPC"); | 645 | if (DebugLevel >= 1) |
646 | m_log.DebugFormat( | ||
647 | "[BASE HTTP SERVER]: Assuming a generic XMLRPC request for {0} {1}", | ||
648 | request.HttpMethod, request.Url.PathAndQuery); | ||
649 | |||
619 | // generic login request. | 650 | // generic login request. |
620 | HandleXmlRpcRequests(request, response); | 651 | HandleXmlRpcRequests(request, response); |
621 | 652 | ||
@@ -872,7 +903,9 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
872 | byte[] buf = Encoding.UTF8.GetBytes("Not found"); | 903 | byte[] buf = Encoding.UTF8.GetBytes("Not found"); |
873 | response.KeepAlive = false; | 904 | response.KeepAlive = false; |
874 | 905 | ||
875 | m_log.ErrorFormat("[BASE HTTP SERVER]: Handler not found for http request {0}", request.RawUrl); | 906 | m_log.ErrorFormat( |
907 | "[BASE HTTP SERVER]: Handler not found for http request {0} {1}", | ||
908 | request.HttpMethod, request.Url.PathAndQuery); | ||
876 | 909 | ||
877 | response.SendChunked = false; | 910 | response.SendChunked = false; |
878 | response.ContentLength64 = buf.Length; | 911 | response.ContentLength64 = buf.Length; |
@@ -978,7 +1011,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
978 | 1011 | ||
979 | if (llsdRequest != null)// && m_defaultLlsdHandler != null) | 1012 | if (llsdRequest != null)// && m_defaultLlsdHandler != null) |
980 | { | 1013 | { |
981 | |||
982 | LLSDMethod llsdhandler = null; | 1014 | LLSDMethod llsdhandler = null; |
983 | 1015 | ||
984 | if (TryGetLLSDHandler(request.RawUrl, out llsdhandler) && !LegacyLLSDLoginLibOMV) | 1016 | if (TryGetLLSDHandler(request.RawUrl, out llsdhandler) && !LegacyLLSDLoginLibOMV) |
@@ -1002,13 +1034,14 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1002 | llsdResponse = GenerateNoLLSDHandlerResponse(); | 1034 | llsdResponse = GenerateNoLLSDHandlerResponse(); |
1003 | } | 1035 | } |
1004 | } | 1036 | } |
1005 | |||
1006 | } | 1037 | } |
1007 | else | 1038 | else |
1008 | { | 1039 | { |
1009 | llsdResponse = GenerateNoLLSDHandlerResponse(); | 1040 | llsdResponse = GenerateNoLLSDHandlerResponse(); |
1010 | } | 1041 | } |
1042 | |||
1011 | byte[] buffer = new byte[0]; | 1043 | byte[] buffer = new byte[0]; |
1044 | |||
1012 | if (llsdResponse.ToString() == "shutdown404!") | 1045 | if (llsdResponse.ToString() == "shutdown404!") |
1013 | { | 1046 | { |
1014 | response.ContentType = "text/plain"; | 1047 | response.ContentType = "text/plain"; |
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; | |||
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Text; | ||
32 | using log4net; | 33 | using log4net; |
33 | using Nini.Config; | 34 | using Nini.Config; |
34 | using Mono.Addins; | 35 | using 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); |