diff options
Diffstat (limited to 'OpenSim/Server')
-rw-r--r-- | OpenSim/Server/Handlers/Map/MapGetServerConnector.cs | 15 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 10 |
2 files changed, 23 insertions, 2 deletions
diff --git a/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs b/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs index 7bb2f39..bd1ddbd 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 | protected override byte[] ProcessRequest(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 86 | protected override byte[] ProcessRequest(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 4ac477f..964ccf8 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | |||
@@ -386,7 +386,15 @@ namespace OpenSim.Server.Handlers.Simulation | |||
386 | // subclasses can override this | 386 | // subclasses can override this |
387 | protected virtual bool CreateAgent(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) | 387 | protected virtual bool CreateAgent(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) |
388 | { | 388 | { |
389 | return m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out reason); | 389 | reason = String.Empty; |
390 | |||
391 | Util.FireAndForget(x => | ||
392 | { | ||
393 | string r; | ||
394 | m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out r); | ||
395 | }); | ||
396 | |||
397 | return true; | ||
390 | } | 398 | } |
391 | } | 399 | } |
392 | 400 | ||