diff options
author | BlueWall | 2012-09-11 22:58:21 -0400 |
---|---|---|
committer | BlueWall | 2012-09-11 22:58:21 -0400 |
commit | e9322b0bf714251719919db8638bf92f19289190 (patch) | |
tree | 4eca77cc71f4428e57f0a4c176189e114bfb9397 | |
parent | Fix prebuild.xml format for reference (diff) | |
parent | minor: Comment out friends notification log spam for now. (diff) | |
download | opensim-SC_OLD-e9322b0bf714251719919db8638bf92f19289190.zip opensim-SC_OLD-e9322b0bf714251719919db8638bf92f19289190.tar.gz opensim-SC_OLD-e9322b0bf714251719919db8638bf92f19289190.tar.bz2 opensim-SC_OLD-e9322b0bf714251719919db8638bf92f19289190.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
-rw-r--r-- | OpenSim/Framework/RegionInfo.cs | 14 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 68 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/MainServer.cs | 53 | ||||
-rw-r--r-- | OpenSim/Framework/Util.cs | 32 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 31 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 83 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 15 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs | 8 | ||||
-rw-r--r-- | bin/OpenSim.ini.example | 8 | ||||
-rw-r--r-- | bin/OpenSimDefaults.ini | 6 |
14 files changed, 262 insertions, 80 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index ded2df2..928e798 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -701,27 +701,27 @@ namespace OpenSim.Framework | |||
701 | 701 | ||
702 | config.Set("ExternalHostName", m_externalHostName); | 702 | config.Set("ExternalHostName", m_externalHostName); |
703 | 703 | ||
704 | if (m_nonphysPrimMin != 0) | 704 | if (m_nonphysPrimMin > 0) |
705 | config.Set("NonphysicalPrimMax", m_nonphysPrimMin); | 705 | config.Set("NonphysicalPrimMax", m_nonphysPrimMin); |
706 | 706 | ||
707 | if (m_nonphysPrimMax != 0) | 707 | if (m_nonphysPrimMax > 0) |
708 | config.Set("NonphysicalPrimMax", m_nonphysPrimMax); | 708 | config.Set("NonphysicalPrimMax", m_nonphysPrimMax); |
709 | 709 | ||
710 | if (m_physPrimMin != 0) | 710 | if (m_physPrimMin > 0) |
711 | config.Set("PhysicalPrimMax", m_physPrimMin); | 711 | config.Set("PhysicalPrimMax", m_physPrimMin); |
712 | 712 | ||
713 | if (m_physPrimMax != 0) | 713 | if (m_physPrimMax > 0) |
714 | config.Set("PhysicalPrimMax", m_physPrimMax); | 714 | config.Set("PhysicalPrimMax", m_physPrimMax); |
715 | 715 | ||
716 | config.Set("ClampPrimSize", m_clampPrimSize.ToString()); | 716 | config.Set("ClampPrimSize", m_clampPrimSize.ToString()); |
717 | 717 | ||
718 | if (m_objectCapacity != 0) | 718 | if (m_objectCapacity > 0) |
719 | config.Set("MaxPrims", m_objectCapacity); | 719 | config.Set("MaxPrims", m_objectCapacity); |
720 | 720 | ||
721 | if (m_linksetCapacity != 0) | 721 | if (m_linksetCapacity > 0) |
722 | config.Set("LinksetPrims", m_linksetCapacity); | 722 | config.Set("LinksetPrims", m_linksetCapacity); |
723 | 723 | ||
724 | if (m_agentCapacity != 0) | 724 | if (m_agentCapacity > 0) |
725 | config.Set("MaxAgents", m_agentCapacity); | 725 | config.Set("MaxAgents", m_agentCapacity); |
726 | 726 | ||
727 | if (ScopeID != UUID.Zero) | 727 | if (ScopeID != UUID.Zero) |
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index f57ea76..c81e283 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -449,9 +449,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
449 | if (TryGetStreamHandler(handlerKey, out requestHandler)) | 449 | if (TryGetStreamHandler(handlerKey, out requestHandler)) |
450 | { | 450 | { |
451 | if (DebugLevel >= 3) | 451 | if (DebugLevel >= 3) |
452 | m_log.DebugFormat( | 452 | LogIncomingToStreamHandler(request, requestHandler); |
453 | "[BASE HTTP SERVER]: Found stream handler for {0} {1} {2} {3}", | ||
454 | request.HttpMethod, request.Url.PathAndQuery, requestHandler.Name, requestHandler.Description); | ||
455 | 453 | ||
456 | response.ContentType = requestHandler.ContentType; // Lets do this defaulting before in case handler has varying content type. | 454 | response.ContentType = requestHandler.ContentType; // Lets do this defaulting before in case handler has varying content type. |
457 | 455 | ||
@@ -563,9 +561,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
563 | if (DoWeHaveALLSDHandler(request.RawUrl)) | 561 | if (DoWeHaveALLSDHandler(request.RawUrl)) |
564 | { | 562 | { |
565 | if (DebugLevel >= 3) | 563 | if (DebugLevel >= 3) |
566 | m_log.DebugFormat( | 564 | LogIncomingToContentTypeHandler(request); |
567 | "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", | ||
568 | request.ContentType, request.HttpMethod, request.Url.PathAndQuery); | ||
569 | 565 | ||
570 | buffer = HandleLLSDRequests(request, response); | 566 | buffer = HandleLLSDRequests(request, response); |
571 | } | 567 | } |
@@ -573,18 +569,14 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
573 | else if (DoWeHaveAHTTPHandler(request.RawUrl)) | 569 | else if (DoWeHaveAHTTPHandler(request.RawUrl)) |
574 | { | 570 | { |
575 | if (DebugLevel >= 3) | 571 | if (DebugLevel >= 3) |
576 | m_log.DebugFormat( | 572 | LogIncomingToContentTypeHandler(request); |
577 | "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", | ||
578 | request.ContentType, request.HttpMethod, request.Url.PathAndQuery); | ||
579 | 573 | ||
580 | buffer = HandleHTTPRequest(request, response); | 574 | buffer = HandleHTTPRequest(request, response); |
581 | } | 575 | } |
582 | else | 576 | else |
583 | { | 577 | { |
584 | if (DebugLevel >= 3) | 578 | if (DebugLevel >= 3) |
585 | m_log.DebugFormat( | 579 | LogIncomingToXmlRpcHandler(request); |
586 | "[BASE HTTP SERVER]: Assuming a generic XMLRPC request for {0} {1}", | ||
587 | request.HttpMethod, request.Url.PathAndQuery); | ||
588 | 580 | ||
589 | // generic login request. | 581 | // generic login request. |
590 | buffer = HandleXmlRpcRequests(request, response); | 582 | buffer = HandleXmlRpcRequests(request, response); |
@@ -654,6 +646,58 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
654 | } | 646 | } |
655 | } | 647 | } |
656 | 648 | ||
649 | private void LogIncomingToStreamHandler(OSHttpRequest request, IRequestHandler requestHandler) | ||
650 | { | ||
651 | m_log.DebugFormat( | ||
652 | "[BASE HTTP SERVER]: Found stream handler for {0} {1} {2} {3}", | ||
653 | request.HttpMethod, request.Url.PathAndQuery, requestHandler.Name, requestHandler.Description); | ||
654 | |||
655 | if (DebugLevel >= 4) | ||
656 | LogIncomingInDetail(request); | ||
657 | } | ||
658 | |||
659 | private void LogIncomingToContentTypeHandler(OSHttpRequest request) | ||
660 | { | ||
661 | m_log.DebugFormat( | ||
662 | "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", | ||
663 | request.ContentType, request.HttpMethod, request.Url.PathAndQuery); | ||
664 | |||
665 | if (DebugLevel >= 4) | ||
666 | LogIncomingInDetail(request); | ||
667 | } | ||
668 | |||
669 | private void LogIncomingToXmlRpcHandler(OSHttpRequest request) | ||
670 | { | ||
671 | m_log.DebugFormat( | ||
672 | "[BASE HTTP SERVER]: Assuming a generic XMLRPC request for {0} {1}", | ||
673 | request.HttpMethod, request.Url.PathAndQuery); | ||
674 | |||
675 | if (DebugLevel >= 4) | ||
676 | LogIncomingInDetail(request); | ||
677 | } | ||
678 | |||
679 | private void LogIncomingInDetail(OSHttpRequest request) | ||
680 | { | ||
681 | using (StreamReader reader = new StreamReader(Util.Copy(request.InputStream), Encoding.UTF8)) | ||
682 | { | ||
683 | string output; | ||
684 | |||
685 | if (DebugLevel == 4) | ||
686 | { | ||
687 | const int sampleLength = 80; | ||
688 | char[] sampleChars = new char[sampleLength]; | ||
689 | reader.Read(sampleChars, 0, sampleLength); | ||
690 | output = string.Format("[BASE HTTP SERVER]: {0}...", sampleChars); | ||
691 | } | ||
692 | else | ||
693 | { | ||
694 | output = string.Format("[BASE HTTP SERVER]: {0}", reader.ReadToEnd()); | ||
695 | } | ||
696 | |||
697 | m_log.Debug(output); | ||
698 | } | ||
699 | } | ||
700 | |||
657 | private bool TryGetStreamHandler(string handlerKey, out IRequestHandler streamHandler) | 701 | private bool TryGetStreamHandler(string handlerKey, out IRequestHandler streamHandler) |
658 | { | 702 | { |
659 | string bestMatch = null; | 703 | string bestMatch = null; |
diff --git a/OpenSim/Framework/Servers/MainServer.cs b/OpenSim/Framework/Servers/MainServer.cs index 8dc0e3a..b367b12 100644 --- a/OpenSim/Framework/Servers/MainServer.cs +++ b/OpenSim/Framework/Servers/MainServer.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using System.Net; | 31 | using System.Net; |
32 | using System.Text; | ||
32 | using log4net; | 33 | using log4net; |
33 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Console; | 35 | using OpenSim.Framework.Console; |
@@ -105,12 +106,19 @@ namespace OpenSim.Framework.Servers | |||
105 | public static void RegisterHttpConsoleCommands(ICommandConsole console) | 106 | public static void RegisterHttpConsoleCommands(ICommandConsole console) |
106 | { | 107 | { |
107 | console.Commands.AddCommand( | 108 | console.Commands.AddCommand( |
109 | "Comms", false, "show http-handlers", | ||
110 | "show http-handlers", | ||
111 | "Show all registered http handlers", HandleShowHttpHandlersCommand); | ||
112 | |||
113 | console.Commands.AddCommand( | ||
108 | "Debug", false, "debug http", "debug http [<level>]", | 114 | "Debug", false, "debug http", "debug http [<level>]", |
109 | "Turn on inbound non-poll http request debugging.", | 115 | "Turn on inbound non-poll http request debugging.", |
110 | "If level <= 0, then no extra logging is done.\n" | 116 | "If level <= 0, then no extra logging is done.\n" |
111 | + "If level >= 1, then short warnings are logged when receiving bad input data.\n" | 117 | + "If level >= 1, then short warnings are logged when receiving bad input data.\n" |
112 | + "If level >= 2, then long warnings are logged when receiving bad input data.\n" | 118 | + "If level >= 2, then long warnings are logged when receiving bad input data.\n" |
113 | + "If level >= 3, then short notices about all incoming non-poll HTTP requests are logged.\n" | 119 | + "If level >= 3, then short notices about all incoming non-poll HTTP requests are logged.\n" |
120 | + "If level >= 4, then a sample from the beginning of the incoming data is logged.\n" | ||
121 | + "If level >= 5, then the entire incoming data is logged.\n" | ||
114 | + "If no level is specified then the current level is returned.", | 122 | + "If no level is specified then the current level is returned.", |
115 | HandleDebugHttpCommand); | 123 | HandleDebugHttpCommand); |
116 | } | 124 | } |
@@ -140,6 +148,51 @@ namespace OpenSim.Framework.Servers | |||
140 | } | 148 | } |
141 | } | 149 | } |
142 | 150 | ||
151 | private static void HandleShowHttpHandlersCommand(string module, string[] args) | ||
152 | { | ||
153 | if (args.Length != 2) | ||
154 | { | ||
155 | MainConsole.Instance.Output("Usage: show http-handlers"); | ||
156 | return; | ||
157 | } | ||
158 | |||
159 | StringBuilder handlers = new StringBuilder(); | ||
160 | |||
161 | lock (m_Servers) | ||
162 | { | ||
163 | foreach (BaseHttpServer httpServer in m_Servers.Values) | ||
164 | { | ||
165 | handlers.AppendFormat( | ||
166 | "Registered HTTP Handlers for server at {0}:{1}\n", httpServer.ListenIPAddress, httpServer.Port); | ||
167 | |||
168 | handlers.AppendFormat("* XMLRPC:\n"); | ||
169 | foreach (String s in httpServer.GetXmlRpcHandlerKeys()) | ||
170 | handlers.AppendFormat("\t{0}\n", s); | ||
171 | |||
172 | handlers.AppendFormat("* HTTP:\n"); | ||
173 | List<String> poll = httpServer.GetPollServiceHandlerKeys(); | ||
174 | foreach (String s in httpServer.GetHTTPHandlerKeys()) | ||
175 | handlers.AppendFormat("\t{0} {1}\n", s, (poll.Contains(s) ? "(poll service)" : string.Empty)); | ||
176 | |||
177 | handlers.AppendFormat("* Agent:\n"); | ||
178 | foreach (String s in httpServer.GetAgentHandlerKeys()) | ||
179 | handlers.AppendFormat("\t{0}\n", s); | ||
180 | |||
181 | handlers.AppendFormat("* LLSD:\n"); | ||
182 | foreach (String s in httpServer.GetLLSDHandlerKeys()) | ||
183 | handlers.AppendFormat("\t{0}\n", s); | ||
184 | |||
185 | handlers.AppendFormat("* StreamHandlers ({0}):\n", httpServer.GetStreamHandlerKeys().Count); | ||
186 | foreach (String s in httpServer.GetStreamHandlerKeys()) | ||
187 | handlers.AppendFormat("\t{0}\n", s); | ||
188 | |||
189 | handlers.Append("\n"); | ||
190 | } | ||
191 | } | ||
192 | |||
193 | MainConsole.Instance.Output(handlers.ToString()); | ||
194 | } | ||
195 | |||
143 | /// <summary> | 196 | /// <summary> |
144 | /// Register an already started HTTP server to the collection of known servers. | 197 | /// Register an already started HTTP server to the collection of known servers. |
145 | /// </summary> | 198 | /// </summary> |
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 38cb3a6..1b9777f 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -1007,6 +1007,38 @@ namespace OpenSim.Framework | |||
1007 | } | 1007 | } |
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | /// <summary> | ||
1011 | /// Copy data from one stream to another, leaving the read position of both streams at the beginning. | ||
1012 | /// </summary> | ||
1013 | /// <param name='inputStream'> | ||
1014 | /// Input stream. Must be seekable. | ||
1015 | /// </param> | ||
1016 | /// <exception cref='ArgumentException'> | ||
1017 | /// Thrown if the input stream is not seekable. | ||
1018 | /// </exception> | ||
1019 | public static Stream Copy(Stream inputStream) | ||
1020 | { | ||
1021 | if (!inputStream.CanSeek) | ||
1022 | throw new ArgumentException("Util.Copy(Stream inputStream) must receive an inputStream that can seek"); | ||
1023 | |||
1024 | const int readSize = 256; | ||
1025 | byte[] buffer = new byte[readSize]; | ||
1026 | MemoryStream ms = new MemoryStream(); | ||
1027 | |||
1028 | int count = inputStream.Read(buffer, 0, readSize); | ||
1029 | |||
1030 | while (count > 0) | ||
1031 | { | ||
1032 | ms.Write(buffer, 0, count); | ||
1033 | count = inputStream.Read(buffer, 0, readSize); | ||
1034 | } | ||
1035 | |||
1036 | ms.Position = 0; | ||
1037 | inputStream.Position = 0; | ||
1038 | |||
1039 | return ms; | ||
1040 | } | ||
1041 | |||
1010 | public static XmlRpcResponse XmlRpcCommand(string url, string methodName, params object[] args) | 1042 | public static XmlRpcResponse XmlRpcCommand(string url, string methodName, params object[] args) |
1011 | { | 1043 | { |
1012 | return SendXmlRpcCommand(url, methodName, args); | 1044 | return SendXmlRpcCommand(url, methodName, args); |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 769eea8..ed339fd 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -332,10 +332,6 @@ namespace OpenSim | |||
332 | "show circuits", | 332 | "show circuits", |
333 | "Show agent circuit data", HandleShow); | 333 | "Show agent circuit data", HandleShow); |
334 | 334 | ||
335 | m_console.Commands.AddCommand("Comms", false, "show http-handlers", | ||
336 | "show http-handlers", | ||
337 | "Show all registered http handlers", HandleShow); | ||
338 | |||
339 | m_console.Commands.AddCommand("Comms", false, "show pending-objects", | 335 | m_console.Commands.AddCommand("Comms", false, "show pending-objects", |
340 | "show pending-objects", | 336 | "show pending-objects", |
341 | "Show # of objects on the pending queues of all scene viewers", HandleShow); | 337 | "Show # of objects on the pending queues of all scene viewers", HandleShow); |
@@ -1013,33 +1009,6 @@ namespace OpenSim | |||
1013 | HandleShowCircuits(); | 1009 | HandleShowCircuits(); |
1014 | break; | 1010 | break; |
1015 | 1011 | ||
1016 | case "http-handlers": | ||
1017 | System.Text.StringBuilder handlers = new System.Text.StringBuilder("Registered HTTP Handlers:\n"); | ||
1018 | |||
1019 | handlers.AppendFormat("* XMLRPC:\n"); | ||
1020 | foreach (String s in HttpServer.GetXmlRpcHandlerKeys()) | ||
1021 | handlers.AppendFormat("\t{0}\n", s); | ||
1022 | |||
1023 | handlers.AppendFormat("* HTTP:\n"); | ||
1024 | List<String> poll = HttpServer.GetPollServiceHandlerKeys(); | ||
1025 | foreach (String s in HttpServer.GetHTTPHandlerKeys()) | ||
1026 | handlers.AppendFormat("\t{0} {1}\n", s, (poll.Contains(s) ? "(poll service)" : string.Empty)); | ||
1027 | |||
1028 | handlers.AppendFormat("* Agent:\n"); | ||
1029 | foreach (String s in HttpServer.GetAgentHandlerKeys()) | ||
1030 | handlers.AppendFormat("\t{0}\n", s); | ||
1031 | |||
1032 | handlers.AppendFormat("* LLSD:\n"); | ||
1033 | foreach (String s in HttpServer.GetLLSDHandlerKeys()) | ||
1034 | handlers.AppendFormat("\t{0}\n", s); | ||
1035 | |||
1036 | handlers.AppendFormat("* StreamHandlers ({0}):\n", HttpServer.GetStreamHandlerKeys().Count); | ||
1037 | foreach (String s in HttpServer.GetStreamHandlerKeys()) | ||
1038 | handlers.AppendFormat("\t{0}\n", s); | ||
1039 | |||
1040 | MainConsole.Instance.Output(handlers.ToString()); | ||
1041 | break; | ||
1042 | |||
1043 | case "modules": | 1012 | case "modules": |
1044 | MainConsole.Instance.Output("The currently loaded shared modules are:"); | 1013 | MainConsole.Instance.Output("The currently loaded shared modules are:"); |
1045 | foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) | 1014 | foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 24ec435..11db18a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | |||
@@ -482,9 +482,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
482 | Util.FireAndForget( | 482 | Util.FireAndForget( |
483 | delegate | 483 | delegate |
484 | { | 484 | { |
485 | m_log.DebugFormat( | 485 | // m_log.DebugFormat( |
486 | "[FRIENDS MODULE]: Notifying {0} friends of {1} of online status {2}", | 486 | // "[FRIENDS MODULE]: Notifying {0} friends of {1} of online status {2}", |
487 | friendList.Count, agentID, online); | 487 | // friendList.Count, agentID, online); |
488 | 488 | ||
489 | // Notify about this user status | 489 | // Notify about this user status |
490 | StatusNotify(friendList, agentID, online); | 490 | StatusNotify(friendList, agentID, online); |
diff --git a/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs b/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs index baac6e8..da39e95 100644 --- a/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs | |||
@@ -35,7 +35,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
35 | 35 | ||
36 | public interface IJsonStoreModule | 36 | public interface IJsonStoreModule |
37 | { | 37 | { |
38 | bool CreateStore(string value, out UUID result); | 38 | bool CreateStore(string value, ref UUID result); |
39 | bool DestroyStore(UUID storeID); | 39 | bool DestroyStore(UUID storeID); |
40 | bool TestPath(UUID storeID, string path, bool useJson); | 40 | bool TestPath(UUID storeID, string path, bool useJson); |
41 | bool SetValue(UUID storeID, string path, string value, bool useJson); | 41 | bool SetValue(UUID storeID, string path, string value, bool useJson); |
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 4d65be9..02c032e 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -47,26 +47,71 @@ namespace OpenSim.Region.Framework.Scenes | |||
47 | 47 | ||
48 | public delegate void OnFrameDelegate(); | 48 | public delegate void OnFrameDelegate(); |
49 | 49 | ||
50 | /// <summary> | ||
51 | /// Triggered on each sim frame. | ||
52 | /// </summary> | ||
53 | /// <remarks> | ||
54 | /// This gets triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.Update"/> | ||
55 | /// Core uses it for things like Sun, Wind & Clouds | ||
56 | /// The MRM module also uses it. | ||
57 | /// </remarks> | ||
50 | public event OnFrameDelegate OnFrame; | 58 | public event OnFrameDelegate OnFrame; |
51 | 59 | ||
52 | public delegate void ClientMovement(ScenePresence client); | 60 | public delegate void ClientMovement(ScenePresence client); |
53 | 61 | ||
62 | /// <summary> | ||
63 | /// Trigerred when an agent moves. | ||
64 | /// </summary> | ||
65 | /// <remarks> | ||
66 | /// This gets triggered in <see cref="OpenSim.Region.Framework.Scenes.ScenePresence.HandleAgentUpdate"/> | ||
67 | /// prior to <see cref="OpenSim.Region.Framework.Scenes.ScenePresence.TriggerScenePresenceUpdated"/> | ||
68 | /// </remarks> | ||
54 | public event ClientMovement OnClientMovement; | 69 | public event ClientMovement OnClientMovement; |
55 | 70 | ||
56 | public delegate void OnTerrainTaintedDelegate(); | 71 | public delegate void OnTerrainTaintedDelegate(); |
57 | 72 | ||
73 | /// <summary> | ||
74 | /// Triggered if the terrain has been edited | ||
75 | /// </summary> | ||
76 | /// <remarks> | ||
77 | /// This gets triggered in <see cref="OpenSim.Region.CoreModules.World.Terrain.CheckForTerrainUpdates"/> | ||
78 | /// after it determines that an update has been made. | ||
79 | /// </remarks> | ||
58 | public event OnTerrainTaintedDelegate OnTerrainTainted; | 80 | public event OnTerrainTaintedDelegate OnTerrainTainted; |
59 | 81 | ||
60 | public delegate void OnTerrainTickDelegate(); | 82 | public delegate void OnTerrainTickDelegate(); |
61 | 83 | ||
84 | /// <summary> | ||
85 | /// Triggered if the terrain has been edited | ||
86 | /// </summary> | ||
87 | /// <remarks> | ||
88 | /// This gets triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.UpdateTerrain"/> | ||
89 | /// but is used by core solely to update the physics engine. | ||
90 | /// </remarks> | ||
62 | public event OnTerrainTickDelegate OnTerrainTick; | 91 | public event OnTerrainTickDelegate OnTerrainTick; |
63 | 92 | ||
64 | public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup); | 93 | public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup); |
65 | 94 | ||
95 | /// <summary> | ||
96 | /// Triggered when a region is backed up/persisted to storage | ||
97 | /// </summary> | ||
98 | /// <remarks> | ||
99 | /// This gets triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.Backup"/> | ||
100 | /// and is fired before the persistence occurs. | ||
101 | /// </remarks> | ||
66 | public event OnBackupDelegate OnBackup; | 102 | public event OnBackupDelegate OnBackup; |
67 | 103 | ||
68 | public delegate void OnClientConnectCoreDelegate(IClientCore client); | 104 | public delegate void OnClientConnectCoreDelegate(IClientCore client); |
69 | 105 | ||
106 | /// <summary> | ||
107 | /// Triggered when a new client connects to the scene. | ||
108 | /// </summary> | ||
109 | /// <remarks> | ||
110 | /// This gets triggered in <see cref="TriggerOnNewClient"/>, | ||
111 | /// which checks if an instance of <see cref="OpenSim.Framework.IClientAPI"/> | ||
112 | /// also implements <see cref="OpenSim.Framework.Client.IClientCore"/> and as such, | ||
113 | /// is not triggered by <see cref="OpenSim.Region.OptionalModules.World.NPC">NPCs</see>. | ||
114 | /// </remarks> | ||
70 | public event OnClientConnectCoreDelegate OnClientConnect; | 115 | public event OnClientConnectCoreDelegate OnClientConnect; |
71 | 116 | ||
72 | public delegate void OnNewClientDelegate(IClientAPI client); | 117 | public delegate void OnNewClientDelegate(IClientAPI client); |
@@ -87,10 +132,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
87 | 132 | ||
88 | public delegate void OnNewPresenceDelegate(ScenePresence presence); | 133 | public delegate void OnNewPresenceDelegate(ScenePresence presence); |
89 | 134 | ||
135 | /// <summary> | ||
136 | /// Triggered when a new presence is added to the scene | ||
137 | /// </summary> | ||
138 | /// <remarks> | ||
139 | /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewClient"/> which is used by both | ||
140 | /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see> | ||
141 | /// </remarks> | ||
90 | public event OnNewPresenceDelegate OnNewPresence; | 142 | public event OnNewPresenceDelegate OnNewPresence; |
91 | 143 | ||
92 | public delegate void OnRemovePresenceDelegate(UUID agentId); | 144 | public delegate void OnRemovePresenceDelegate(UUID agentId); |
93 | 145 | ||
146 | /// <summary> | ||
147 | /// Triggered when a presence is removed from the scene | ||
148 | /// </summary> | ||
149 | /// <remarks> | ||
150 | /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewClient"/> which is used by both | ||
151 | /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see> | ||
152 | /// </remarks> | ||
94 | public event OnRemovePresenceDelegate OnRemovePresence; | 153 | public event OnRemovePresenceDelegate OnRemovePresence; |
95 | 154 | ||
96 | public delegate void OnParcelPrimCountUpdateDelegate(); | 155 | public delegate void OnParcelPrimCountUpdateDelegate(); |
@@ -481,6 +540,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
481 | /// <param name="copy"></param> | 540 | /// <param name="copy"></param> |
482 | /// <param name="original"></param> | 541 | /// <param name="original"></param> |
483 | /// <param name="userExposed">True if the duplicate will immediately be in the scene, false otherwise</param> | 542 | /// <param name="userExposed">True if the duplicate will immediately be in the scene, false otherwise</param> |
543 | /// <remarks> | ||
544 | /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.SceneObjectPart.Copy"/> | ||
545 | /// </remarks> | ||
484 | public event SceneObjectPartCopyDelegate OnSceneObjectPartCopy; | 546 | public event SceneObjectPartCopyDelegate OnSceneObjectPartCopy; |
485 | public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); | 547 | public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); |
486 | 548 | ||
@@ -589,8 +651,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
589 | 651 | ||
590 | public delegate void LandBuy(Object sender, LandBuyArgs e); | 652 | public delegate void LandBuy(Object sender, LandBuyArgs e); |
591 | 653 | ||
654 | /// <summary> | ||
655 | /// Triggered when an attempt to transfer grid currency occurs | ||
656 | /// </summary> | ||
657 | /// <remarks> | ||
658 | /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.ProcessMoneyTransferRequest"/> | ||
659 | /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.SubscribeToClientGridEvents"/> | ||
660 | /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.SubscribeToClientEvents"/> | ||
661 | /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewClient"/> | ||
662 | /// </remarks> | ||
592 | public event MoneyTransferEvent OnMoneyTransfer; | 663 | public event MoneyTransferEvent OnMoneyTransfer; |
664 | |||
665 | /// <summary> | ||
666 | /// Triggered after after <see cref="OnValidateLandBuy"/> | ||
667 | /// </summary> | ||
593 | public event LandBuy OnLandBuy; | 668 | public event LandBuy OnLandBuy; |
669 | |||
670 | /// <summary> | ||
671 | /// Triggered to allow or prevent a real estate transaction | ||
672 | /// </summary> | ||
673 | /// <remarks> | ||
674 | /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.ProcessParcelBuy"/> | ||
675 | /// <seealso cref="OpenSim.Region.OptionalModules.World.MoneyModule.SampleMoneyModule.ValidateLandBuy"/> | ||
676 | /// </remarks> | ||
594 | public event LandBuy OnValidateLandBuy; | 677 | public event LandBuy OnValidateLandBuy; |
595 | 678 | ||
596 | public void TriggerOnAttach(uint localID, UUID itemID, UUID avatarID) | 679 | public void TriggerOnAttach(uint localID, UUID itemID, UUID avatarID) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index e528288..ac26be7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2022,13 +2022,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
2022 | m_scene.m_linksetCapacity) | 2022 | m_scene.m_linksetCapacity) |
2023 | { | 2023 | { |
2024 | m_log.DebugFormat( | 2024 | m_log.DebugFormat( |
2025 | "[SCENE OBJECT GROUP]: Cannot link group with root" + | 2025 | "[SCENE OBJECT GROUP]: Cannot link group with root" + |
2026 | " part {0}, {1} ({2} prims) to group with root part" + | 2026 | " part {0}, {1} ({2} prims) to group with root part" + |
2027 | " {3}, {4} ({5} prims) because the new linkset" + | 2027 | " {3}, {4} ({5} prims) because the new linkset" + |
2028 | " would exceed the configured maximum of {6}", | 2028 | " would exceed the configured maximum of {6}", |
2029 | objectGroup.RootPart.Name, objectGroup.RootPart.UUID, | 2029 | objectGroup.RootPart.Name, objectGroup.RootPart.UUID, |
2030 | objectGroup.PrimCount, RootPart.Name, RootPart.UUID, | 2030 | objectGroup.PrimCount, RootPart.Name, RootPart.UUID, |
2031 | PrimCount, m_scene.m_linksetCapacity); | 2031 | PrimCount, m_scene.m_linksetCapacity); |
2032 | |||
2032 | return; | 2033 | return; |
2033 | } | 2034 | } |
2034 | 2035 | ||
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs index 311531c..732c28f 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs | |||
@@ -175,14 +175,15 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore | |||
175 | /// | 175 | /// |
176 | /// </summary> | 176 | /// </summary> |
177 | // ----------------------------------------------------------------- | 177 | // ----------------------------------------------------------------- |
178 | public bool CreateStore(string value, out UUID result) | 178 | public bool CreateStore(string value, ref UUID result) |
179 | { | 179 | { |
180 | result = UUID.Zero; | 180 | if (result == UUID.Zero) |
181 | result = UUID.Random(); | ||
182 | |||
183 | JsonStore map = null; | ||
181 | 184 | ||
182 | if (! m_enabled) return false; | 185 | if (! m_enabled) return false; |
183 | 186 | ||
184 | UUID uuid = UUID.Random(); | ||
185 | JsonStore map = null; | ||
186 | 187 | ||
187 | try | 188 | try |
188 | { | 189 | { |
@@ -195,9 +196,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore | |||
195 | } | 196 | } |
196 | 197 | ||
197 | lock (m_JsonValueStore) | 198 | lock (m_JsonValueStore) |
198 | m_JsonValueStore.Add(uuid,map); | 199 | m_JsonValueStore.Add(result,map); |
199 | 200 | ||
200 | result = uuid; | ||
201 | return true; | 201 | return true; |
202 | } | 202 | } |
203 | 203 | ||
@@ -231,7 +231,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore | |||
231 | if (! m_JsonValueStore.TryGetValue(storeID,out map)) | 231 | if (! m_JsonValueStore.TryGetValue(storeID,out map)) |
232 | { | 232 | { |
233 | m_log.InfoFormat("[JsonStore] Missing store {0}",storeID); | 233 | m_log.InfoFormat("[JsonStore] Missing store {0}",storeID); |
234 | return true; | 234 | return false; |
235 | } | 235 | } |
236 | } | 236 | } |
237 | 237 | ||
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs index eaba816..6910d14 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs | |||
@@ -227,7 +227,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore | |||
227 | protected UUID JsonCreateStore(UUID hostID, UUID scriptID, string value) | 227 | protected UUID JsonCreateStore(UUID hostID, UUID scriptID, string value) |
228 | { | 228 | { |
229 | UUID uuid = UUID.Zero; | 229 | UUID uuid = UUID.Zero; |
230 | if (! m_store.CreateStore(value, out uuid)) | 230 | if (! m_store.CreateStore(value, ref uuid)) |
231 | GenerateRuntimeError("Failed to create Json store"); | 231 | GenerateRuntimeError("Failed to create Json store"); |
232 | 232 | ||
233 | return uuid; | 233 | return uuid; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs index cde2d9f..6809c09 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs | |||
@@ -254,7 +254,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
254 | 254 | ||
255 | object[] convertedParms = new object[parms.Length]; | 255 | object[] convertedParms = new object[parms.Length]; |
256 | for (int i = 0; i < parms.Length; i++) | 256 | for (int i = 0; i < parms.Length; i++) |
257 | convertedParms[i] = ConvertFromLSL(parms[i],signature[i]); | 257 | convertedParms[i] = ConvertFromLSL(parms[i],signature[i], fname); |
258 | 258 | ||
259 | // now call the function, the contract with the function is that it will always return | 259 | // now call the function, the contract with the function is that it will always return |
260 | // non-null but don't trust it completely | 260 | // non-null but don't trust it completely |
@@ -294,7 +294,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
294 | 294 | ||
295 | /// <summary> | 295 | /// <summary> |
296 | /// </summary> | 296 | /// </summary> |
297 | protected object ConvertFromLSL(object lslparm, Type type) | 297 | protected object ConvertFromLSL(object lslparm, Type type, string fname) |
298 | { | 298 | { |
299 | // ---------- String ---------- | 299 | // ---------- String ---------- |
300 | if (lslparm is LSL_String) | 300 | if (lslparm is LSL_String) |
@@ -374,14 +374,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
374 | (LSL_Vector)plist[i]); | 374 | (LSL_Vector)plist[i]); |
375 | } | 375 | } |
376 | else | 376 | else |
377 | MODError("unknown LSL list element type"); | 377 | MODError(String.Format("{0}: unknown LSL list element type", fname)); |
378 | } | 378 | } |
379 | 379 | ||
380 | return result; | 380 | return result; |
381 | } | 381 | } |
382 | } | 382 | } |
383 | 383 | ||
384 | MODError(String.Format("parameter type mismatch; expecting {0}",type.Name)); | 384 | MODError(String.Format("{1}: parameter type mismatch; expecting {0}",type.Name, fname)); |
385 | return null; | 385 | return null; |
386 | } | 386 | } |
387 | 387 | ||
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index f0ebcce..0de4002 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -108,10 +108,10 @@ | |||
108 | ;; This can be overriden in the region config file. | 108 | ;; This can be overriden in the region config file. |
109 | ; ClampPrimSize = false | 109 | ; ClampPrimSize = false |
110 | 110 | ||
111 | ;# {LinksetPrims} {} {Max prims an object will hold?} {} 0 | 111 | ;# {LinksetPrims} {} {Max prims an object will hold?} {} 0 |
112 | ;; Maximum number of prims allowable in a linkset. Affects creating new linksets. Ignored if less than or equal to zero. | 112 | ;; Maximum number of prims allowable in a linkset. Affects creating new linksets. Ignored if less than or equal to zero. |
113 | ;; This can be overriden in the region config file. | 113 | ;; This can be overriden in the region config file. |
114 | ; LinksetPrims = 0 | 114 | ; LinksetPrims = 0 |
115 | 115 | ||
116 | ;# {AllowScriptCrossing} {} {Allow scripts to cross into this region} {true false} true | 116 | ;# {AllowScriptCrossing} {} {Allow scripts to cross into this region} {true false} true |
117 | ;; Allow scripts to keep running when they cross region boundaries, rather than being restarted. State is reloaded on the destination region. | 117 | ;; Allow scripts to keep running when they cross region boundaries, rather than being restarted. State is reloaded on the destination region. |
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index c080fbf..0173f5b 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -95,9 +95,9 @@ | |||
95 | ; This can be overriden in the region config file. | 95 | ; This can be overriden in the region config file. |
96 | ClampPrimSize = false | 96 | ClampPrimSize = false |
97 | 97 | ||
98 | ; Maximum number of prims allowable in a linkset. Affects creating new linksets. Ignored if less than or equal to zero. | 98 | ; Maximum number of prims allowable in a linkset. Affects creating new linksets. Ignored if less than or equal to zero. |
99 | ; This can be overriden in the region config file. | 99 | ; This can be overriden in the region config file. |
100 | LinksetPrims = 0 | 100 | LinksetPrims = 0 |
101 | 101 | ||
102 | ; Allow scripts to keep running when they cross region boundaries, rather than being restarted. State is reloaded on the destination region. | 102 | ; Allow scripts to keep running when they cross region boundaries, rather than being restarted. State is reloaded on the destination region. |
103 | ; This only applies when crossing to a region running in a different simulator. | 103 | ; This only applies when crossing to a region running in a different simulator. |