diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Server/Handlers/Map/MapGetServerConnector.cs | 15 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 23 |
2 files changed, 37 insertions, 1 deletions
diff --git a/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs b/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs index fb85d1c..4502b7d 100644 --- a/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs +++ b/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using System.IO; | 29 | using System.IO; |
30 | using System.Net; | 30 | using System.Net; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Threading; | ||
32 | 33 | ||
33 | using Nini.Config; | 34 | using Nini.Config; |
34 | using log4net; | 35 | using log4net; |
@@ -70,6 +71,8 @@ namespace OpenSim.Server.Handlers.MapImage | |||
70 | 71 | ||
71 | class MapServerGetHandler : BaseStreamHandler | 72 | class MapServerGetHandler : BaseStreamHandler |
72 | { | 73 | { |
74 | public static ManualResetEvent ev = new ManualResetEvent(true); | ||
75 | |||
73 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 76 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
74 | 77 | ||
75 | private IMapImageService m_MapService; | 78 | private IMapImageService m_MapService; |
@@ -82,8 +85,13 @@ namespace OpenSim.Server.Handlers.MapImage | |||
82 | 85 | ||
83 | public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 86 | public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
84 | { | 87 | { |
85 | byte[] result = new byte[0]; | 88 | ev.WaitOne(); |
89 | lock (ev) | ||
90 | { | ||
91 | ev.Reset(); | ||
92 | } | ||
86 | 93 | ||
94 | byte[] result = new byte[0]; | ||
87 | string format = string.Empty; | 95 | string format = string.Empty; |
88 | result = m_MapService.GetMapTile(path.Trim('/'), out format); | 96 | result = m_MapService.GetMapTile(path.Trim('/'), out format); |
89 | if (result.Length > 0) | 97 | if (result.Length > 0) |
@@ -100,6 +108,11 @@ namespace OpenSim.Server.Handlers.MapImage | |||
100 | httpResponse.ContentType = "text/plain"; | 108 | httpResponse.ContentType = "text/plain"; |
101 | } | 109 | } |
102 | 110 | ||
111 | lock (ev) | ||
112 | { | ||
113 | ev.Set(); | ||
114 | } | ||
115 | |||
103 | return result; | 116 | return result; |
104 | } | 117 | } |
105 | 118 | ||
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 012b14e..d772c39 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | |||
@@ -100,6 +100,11 @@ namespace OpenSim.Server.Handlers.Simulation | |||
100 | DoAgentDelete(request, responsedata, agentID, action, regionID); | 100 | DoAgentDelete(request, responsedata, agentID, action, regionID); |
101 | return responsedata; | 101 | return responsedata; |
102 | } | 102 | } |
103 | else if (method.Equals("DELETECHILD")) | ||
104 | { | ||
105 | DoChildAgentDelete(request, responsedata, agentID, action, regionID); | ||
106 | return responsedata; | ||
107 | } | ||
103 | else if (method.Equals("QUERYACCESS")) | 108 | else if (method.Equals("QUERYACCESS")) |
104 | { | 109 | { |
105 | DoQueryAccess(request, responsedata, agentID, regionID); | 110 | DoQueryAccess(request, responsedata, agentID, regionID); |
@@ -208,6 +213,24 @@ namespace OpenSim.Server.Handlers.Simulation | |||
208 | } | 213 | } |
209 | } | 214 | } |
210 | 215 | ||
216 | protected void DoChildAgentDelete(Hashtable request, Hashtable responsedata, UUID id, string action, UUID regionID) | ||
217 | { | ||
218 | m_log.Debug(" >>> DoChildAgentDelete action:" + action + "; RegionID:" + regionID); | ||
219 | |||
220 | GridRegion destination = new GridRegion(); | ||
221 | destination.RegionID = regionID; | ||
222 | |||
223 | if (action.Equals("release")) | ||
224 | ReleaseAgent(regionID, id); | ||
225 | else | ||
226 | m_SimulationService.CloseChildAgent(destination, id); | ||
227 | |||
228 | responsedata["int_response_code"] = HttpStatusCode.OK; | ||
229 | responsedata["str_response_string"] = "OpenSim agent " + id.ToString(); | ||
230 | |||
231 | m_log.Debug("[AGENT HANDLER]: Child Agent Released/Deleted."); | ||
232 | } | ||
233 | |||
211 | protected void DoAgentDelete(Hashtable request, Hashtable responsedata, UUID id, string action, UUID regionID) | 234 | protected void DoAgentDelete(Hashtable request, Hashtable responsedata, UUID id, string action, UUID regionID) |
212 | { | 235 | { |
213 | m_log.Debug(" >>> DoDelete action:" + action + "; RegionID:" + regionID); | 236 | m_log.Debug(" >>> DoDelete action:" + action + "; RegionID:" + regionID); |