diff options
Diffstat (limited to 'OpenSim/Region')
9 files changed, 209 insertions, 63 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 52ded3d..62abf8e 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -351,7 +351,18 @@ namespace OpenSim | |||
351 | if (startupConfig == null || startupConfig.GetBoolean("JobEngineEnabled", true)) | 351 | if (startupConfig == null || startupConfig.GetBoolean("JobEngineEnabled", true)) |
352 | WorkManager.JobEngine.Start(); | 352 | WorkManager.JobEngine.Start(); |
353 | 353 | ||
354 | m_httpServerPort = m_networkServersInfo.HttpListenerPort; | 354 | |
355 | if(m_networkServersInfo.HttpUsesSSL) | ||
356 | { | ||
357 | m_httpServerSSL = true; | ||
358 | m_httpServerPort = m_networkServersInfo.httpSSLPort; | ||
359 | } | ||
360 | else | ||
361 | { | ||
362 | m_httpServerSSL = false; | ||
363 | m_httpServerPort = m_networkServersInfo.HttpListenerPort; | ||
364 | } | ||
365 | |||
355 | SceneManager.OnRestartSim += HandleRestartRegion; | 366 | SceneManager.OnRestartSim += HandleRestartRegion; |
356 | 367 | ||
357 | // Only enable the watchdogs when all regions are ready. Otherwise we get false positives when cpu is | 368 | // Only enable the watchdogs when all regions are ready. Otherwise we get false positives when cpu is |
@@ -404,7 +415,18 @@ namespace OpenSim | |||
404 | 415 | ||
405 | // set initial ServerURI | 416 | // set initial ServerURI |
406 | regionInfo.HttpPort = m_httpServerPort; | 417 | regionInfo.HttpPort = m_httpServerPort; |
407 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/"; | 418 | if(m_httpServerSSL) |
419 | { | ||
420 | if(m_networkServersInfo.HttpSSLCN != regionInfo.ExternalHostName) | ||
421 | throw new Exception("main http cert CN doesn't match region External IP"); | ||
422 | |||
423 | regionInfo.ServerURI = "https://" + regionInfo.ExternalHostName + | ||
424 | ":" + regionInfo.HttpPort.ToString() + "/"; | ||
425 | } | ||
426 | else | ||
427 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + | ||
428 | ":" + regionInfo.HttpPort.ToString() + "/"; | ||
429 | |||
408 | 430 | ||
409 | regionInfo.osSecret = m_osSecret; | 431 | regionInfo.osSecret = m_osSecret; |
410 | 432 | ||
diff --git a/OpenSim/Region/Application/RegionApplicationBase.cs b/OpenSim/Region/Application/RegionApplicationBase.cs index ba92fd6..603f139 100644 --- a/OpenSim/Region/Application/RegionApplicationBase.cs +++ b/OpenSim/Region/Application/RegionApplicationBase.cs | |||
@@ -50,6 +50,7 @@ namespace OpenSim | |||
50 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); | 50 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); |
51 | protected NetworkServersInfo m_networkServersInfo; | 51 | protected NetworkServersInfo m_networkServersInfo; |
52 | protected uint m_httpServerPort; | 52 | protected uint m_httpServerPort; |
53 | protected bool m_httpServerSSL; | ||
53 | protected ISimulationDataService m_simulationDataService; | 54 | protected ISimulationDataService m_simulationDataService; |
54 | protected IEstateDataService m_estateDataService; | 55 | protected IEstateDataService m_estateDataService; |
55 | 56 | ||
@@ -70,15 +71,18 @@ namespace OpenSim | |||
70 | 71 | ||
71 | m_httpServer | 72 | m_httpServer |
72 | = new BaseHttpServer( | 73 | = new BaseHttpServer( |
73 | m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort, | 74 | m_httpServerPort, m_networkServersInfo.HttpUsesSSL, |
74 | m_networkServersInfo.HttpSSLCN); | 75 | m_networkServersInfo.httpSSLPort, m_networkServersInfo.HttpSSLCN, |
75 | 76 | m_networkServersInfo.HttpSSLCertPath, m_networkServersInfo.HttpSSLCNCertPass); | |
77 | |||
78 | /* why this? we only run one | ||
76 | if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort)) | 79 | if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort)) |
77 | { | 80 | { |
78 | m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports"); | 81 | m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports"); |
79 | } | 82 | } |
80 | 83 | */ | |
81 | m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort); | 84 | m_log.InfoFormat("[REGION SERVER]: Starting HTTP{0} server on port {1}", |
85 | m_networkServersInfo.HttpUsesSSL ? "S" : "", m_httpServerPort); | ||
82 | m_httpServer.Start(); | 86 | m_httpServer.Start(); |
83 | 87 | ||
84 | MainServer.AddHttpServer(m_httpServer); | 88 | MainServer.AddHttpServer(m_httpServer); |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index ba3edd6..11e8075 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | |||
@@ -372,7 +372,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
372 | 372 | ||
373 | caps.RegisterPollHandler( | 373 | caps.RegisterPollHandler( |
374 | "EventQueueGet", | 374 | "EventQueueGet", |
375 | new PollServiceEventArgs(null, GenerateEqgCapPath(eventQueueGetUUID), HasEvents, GetEvents, NoEvents, agentID, SERVER_EQ_TIME_NO_EVENTS)); | 375 | new PollServiceEventArgs(null, GenerateEqgCapPath(eventQueueGetUUID), HasEvents, GetEvents, NoEvents, Drop, agentID, SERVER_EQ_TIME_NO_EVENTS)); |
376 | } | 376 | } |
377 | 377 | ||
378 | public bool HasEvents(UUID requestID, UUID agentID) | 378 | public bool HasEvents(UUID requestID, UUID agentID) |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs index 5eb4452..507d9b8 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Region.ClientStack.Linden.Tests | |||
65 | // variables and the VM is not restarted between tests. | 65 | // variables and the VM is not restarted between tests. |
66 | MainServer.RemoveHttpServer(port); | 66 | MainServer.RemoveHttpServer(port); |
67 | 67 | ||
68 | BaseHttpServer server = new BaseHttpServer(port, false, sslPort, ""); | 68 | BaseHttpServer server = new BaseHttpServer(port, false, sslPort, "","",""); |
69 | MainServer.AddHttpServer(server); | 69 | MainServer.AddHttpServer(server); |
70 | MainServer.Instance = server; | 70 | MainServer.Instance = server; |
71 | 71 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs index f66ef57..783c3de 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs | |||
@@ -222,11 +222,12 @@ namespace OpenSim.Region.ClientStack.Linden | |||
222 | new List<Hashtable>(); | 222 | new List<Hashtable>(); |
223 | private Dictionary<UUID, aPollResponse> responses = | 223 | private Dictionary<UUID, aPollResponse> responses = |
224 | new Dictionary<UUID, aPollResponse>(); | 224 | new Dictionary<UUID, aPollResponse>(); |
225 | private HashSet<UUID> dropedResponses = new HashSet<UUID>(); | ||
225 | 226 | ||
226 | private Scene m_scene; | 227 | private Scene m_scene; |
227 | private MeshCapsDataThrottler m_throttler; | 228 | private MeshCapsDataThrottler m_throttler; |
228 | public PollServiceMeshEventArgs(string uri, UUID pId, Scene scene) : | 229 | public PollServiceMeshEventArgs(string uri, UUID pId, Scene scene) : |
229 | base(null, uri, null, null, null, pId, int.MaxValue) | 230 | base(null, uri, null, null, null, null, pId, int.MaxValue) |
230 | { | 231 | { |
231 | m_scene = scene; | 232 | m_scene = scene; |
232 | m_throttler = new MeshCapsDataThrottler(100000, 1400000, 10000, scene, pId); | 233 | m_throttler = new MeshCapsDataThrottler(100000, 1400000, 10000, scene, pId); |
@@ -241,6 +242,17 @@ namespace OpenSim.Region.ClientStack.Linden | |||
241 | 242 | ||
242 | } | 243 | } |
243 | }; | 244 | }; |
245 | |||
246 | Drop = (x, y) => | ||
247 | { | ||
248 | lock (responses) | ||
249 | { | ||
250 | responses.Remove(x); | ||
251 | lock(dropedResponses) | ||
252 | dropedResponses.Add(x); | ||
253 | } | ||
254 | }; | ||
255 | |||
244 | GetEvents = (x, y) => | 256 | GetEvents = (x, y) => |
245 | { | 257 | { |
246 | lock (responses) | 258 | lock (responses) |
@@ -298,26 +310,47 @@ namespace OpenSim.Region.ClientStack.Linden | |||
298 | if(m_scene.ShuttingDown) | 310 | if(m_scene.ShuttingDown) |
299 | return; | 311 | return; |
300 | 312 | ||
301 | // If the avatar is gone, don't bother to get the texture | 313 | lock(responses) |
302 | if (m_scene.GetScenePresence(Id) == null) | ||
303 | { | 314 | { |
304 | response = new Hashtable(); | 315 | lock(dropedResponses) |
316 | { | ||
317 | if(dropedResponses.Contains(requestID)) | ||
318 | { | ||
319 | dropedResponses.Remove(requestID); | ||
320 | return; | ||
321 | } | ||
322 | } | ||
323 | |||
324 | // If the avatar is gone, don't bother to get the texture | ||
325 | if (m_scene.GetScenePresence(Id) == null) | ||
326 | { | ||
327 | response = new Hashtable(); | ||
305 | 328 | ||
306 | response["int_response_code"] = 500; | 329 | response["int_response_code"] = 500; |
307 | response["str_response_string"] = "Script timeout"; | 330 | response["str_response_string"] = "Script timeout"; |
308 | response["content_type"] = "text/plain"; | 331 | response["content_type"] = "text/plain"; |
309 | response["keepalive"] = false; | 332 | response["keepalive"] = false; |
310 | response["reusecontext"] = false; | 333 | response["reusecontext"] = false; |
311 | 334 | ||
312 | lock (responses) | ||
313 | responses[requestID] = new aPollResponse() { bytes = 0, response = response, lod = 0 }; | 335 | responses[requestID] = new aPollResponse() { bytes = 0, response = response, lod = 0 }; |
314 | 336 | ||
315 | return; | 337 | return; |
338 | } | ||
316 | } | 339 | } |
317 | 340 | ||
318 | response = m_getMeshHandler.Handle(requestinfo.request); | 341 | response = m_getMeshHandler.Handle(requestinfo.request); |
342 | |||
319 | lock (responses) | 343 | lock (responses) |
320 | { | 344 | { |
345 | lock(dropedResponses) | ||
346 | { | ||
347 | if(dropedResponses.Contains(requestID)) | ||
348 | { | ||
349 | dropedResponses.Remove(requestID); | ||
350 | return; | ||
351 | } | ||
352 | } | ||
353 | |||
321 | responses[requestID] = new aPollResponse() | 354 | responses[requestID] = new aPollResponse() |
322 | { | 355 | { |
323 | bytes = (int)response["int_bytes"], | 356 | bytes = (int)response["int_bytes"], |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index 14a59fe..15c0967 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs | |||
@@ -218,11 +218,12 @@ namespace OpenSim.Region.ClientStack.Linden | |||
218 | new List<Hashtable>(); | 218 | new List<Hashtable>(); |
219 | private Dictionary<UUID, aPollResponse> responses = | 219 | private Dictionary<UUID, aPollResponse> responses = |
220 | new Dictionary<UUID, aPollResponse>(); | 220 | new Dictionary<UUID, aPollResponse>(); |
221 | private HashSet<UUID> dropedResponses = new HashSet<UUID>(); | ||
221 | 222 | ||
222 | private Scene m_scene; | 223 | private Scene m_scene; |
223 | private CapsDataThrottler m_throttler = new CapsDataThrottler(100000, 1400000,10000); | 224 | private CapsDataThrottler m_throttler = new CapsDataThrottler(100000, 1400000,10000); |
224 | public PollServiceTextureEventArgs(UUID pId, Scene scene) : | 225 | public PollServiceTextureEventArgs(UUID pId, Scene scene) : |
225 | base(null, "", null, null, null, pId, int.MaxValue) | 226 | base(null, "", null, null, null, null, pId, int.MaxValue) |
226 | { | 227 | { |
227 | m_scene = scene; | 228 | m_scene = scene; |
228 | // x is request id, y is userid | 229 | // x is request id, y is userid |
@@ -236,6 +237,16 @@ namespace OpenSim.Region.ClientStack.Linden | |||
236 | 237 | ||
237 | } | 238 | } |
238 | }; | 239 | }; |
240 | |||
241 | Drop = (x, y) => | ||
242 | { | ||
243 | lock (responses) | ||
244 | { | ||
245 | responses.Remove(x); | ||
246 | dropedResponses.Add(x); | ||
247 | } | ||
248 | }; | ||
249 | |||
239 | GetEvents = (x, y) => | 250 | GetEvents = (x, y) => |
240 | { | 251 | { |
241 | lock (responses) | 252 | lock (responses) |
@@ -304,52 +315,71 @@ namespace OpenSim.Region.ClientStack.Linden | |||
304 | if(m_scene.ShuttingDown) | 315 | if(m_scene.ShuttingDown) |
305 | return; | 316 | return; |
306 | 317 | ||
307 | if (requestinfo.send503) | 318 | lock (responses) |
308 | { | 319 | { |
309 | response = new Hashtable(); | 320 | lock(dropedResponses) |
321 | { | ||
322 | if(dropedResponses.Contains(requestID)) | ||
323 | { | ||
324 | dropedResponses.Remove(requestID); | ||
325 | return; | ||
326 | } | ||
327 | } | ||
310 | 328 | ||
311 | response["int_response_code"] = 503; | 329 | if (requestinfo.send503) |
312 | response["str_response_string"] = "Throttled"; | 330 | { |
313 | response["content_type"] = "text/plain"; | 331 | response = new Hashtable(); |
314 | response["keepalive"] = false; | ||
315 | response["reusecontext"] = false; | ||
316 | 332 | ||
317 | Hashtable headers = new Hashtable(); | 333 | response["int_response_code"] = 503; |
318 | headers["Retry-After"] = 30; | 334 | response["str_response_string"] = "Throttled"; |
319 | response["headers"] = headers; | 335 | response["content_type"] = "text/plain"; |
320 | 336 | response["keepalive"] = false; | |
321 | lock (responses) | 337 | response["reusecontext"] = false; |
338 | |||
339 | Hashtable headers = new Hashtable(); | ||
340 | headers["Retry-After"] = 30; | ||
341 | response["headers"] = headers; | ||
342 | |||
322 | responses[requestID] = new aPollResponse() {bytes = 0, response = response}; | 343 | responses[requestID] = new aPollResponse() {bytes = 0, response = response}; |
323 | 344 | ||
324 | return; | 345 | return; |
325 | } | 346 | } |
326 | 347 | ||
327 | // If the avatar is gone, don't bother to get the texture | 348 | // If the avatar is gone, don't bother to get the texture |
328 | if (m_scene.GetScenePresence(Id) == null) | 349 | if (m_scene.GetScenePresence(Id) == null) |
329 | { | 350 | { |
330 | response = new Hashtable(); | 351 | response = new Hashtable(); |
331 | 352 | ||
332 | response["int_response_code"] = 500; | 353 | response["int_response_code"] = 500; |
333 | response["str_response_string"] = "Script timeout"; | 354 | response["str_response_string"] = "Script timeout"; |
334 | response["content_type"] = "text/plain"; | 355 | response["content_type"] = "text/plain"; |
335 | response["keepalive"] = false; | 356 | response["keepalive"] = false; |
336 | response["reusecontext"] = false; | 357 | response["reusecontext"] = false; |
337 | 358 | ||
338 | lock (responses) | ||
339 | responses[requestID] = new aPollResponse() {bytes = 0, response = response}; | 359 | responses[requestID] = new aPollResponse() {bytes = 0, response = response}; |
340 | 360 | ||
341 | return; | 361 | return; |
362 | } | ||
342 | } | 363 | } |
343 | 364 | ||
344 | response = m_getTextureHandler.Handle(requestinfo.request); | 365 | response = m_getTextureHandler.Handle(requestinfo.request); |
366 | |||
345 | lock (responses) | 367 | lock (responses) |
346 | { | 368 | { |
369 | lock(dropedResponses) | ||
370 | { | ||
371 | if(dropedResponses.Contains(requestID)) | ||
372 | { | ||
373 | dropedResponses.Remove(requestID); | ||
374 | m_throttler.ProcessTime(); | ||
375 | return; | ||
376 | } | ||
377 | } | ||
347 | responses[requestID] = new aPollResponse() | 378 | responses[requestID] = new aPollResponse() |
348 | { | 379 | { |
349 | bytes = (int) response["int_bytes"], | 380 | bytes = (int) response["int_bytes"], |
350 | response = response | 381 | response = response |
351 | }; | 382 | }; |
352 | |||
353 | } | 383 | } |
354 | m_throttler.ProcessTime(); | 384 | m_throttler.ProcessTime(); |
355 | } | 385 | } |
@@ -423,7 +453,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
423 | 453 | ||
424 | internal sealed class CapsDataThrottler | 454 | internal sealed class CapsDataThrottler |
425 | { | 455 | { |
426 | |||
427 | private volatile int currenttime = 0; | 456 | private volatile int currenttime = 0; |
428 | private volatile int lastTimeElapsed = 0; | 457 | private volatile int lastTimeElapsed = 0; |
429 | private volatile int BytesSent = 0; | 458 | private volatile int BytesSent = 0; |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index ba4fb76..0277a24 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs | |||
@@ -61,7 +61,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
61 | public UUID reqID; | 61 | public UUID reqID; |
62 | public Hashtable request; | 62 | public Hashtable request; |
63 | public ScenePresence presence; | 63 | public ScenePresence presence; |
64 | public List<UUID> folders; | ||
65 | } | 64 | } |
66 | 65 | ||
67 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 66 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -250,17 +249,28 @@ namespace OpenSim.Region.ClientStack.Linden | |||
250 | { | 249 | { |
251 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 250 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
252 | 251 | ||
253 | private Dictionary<UUID, Hashtable> responses = | 252 | private Dictionary<UUID, Hashtable> responses = new Dictionary<UUID, Hashtable>(); |
254 | new Dictionary<UUID, Hashtable>(); | 253 | private HashSet<UUID> dropedResponses = new HashSet<UUID>(); |
255 | 254 | ||
256 | private WebFetchInvDescModule m_module; | 255 | private WebFetchInvDescModule m_module; |
257 | 256 | ||
258 | public PollServiceInventoryEventArgs(WebFetchInvDescModule module, string url, UUID pId) : | 257 | public PollServiceInventoryEventArgs(WebFetchInvDescModule module, string url, UUID pId) : |
259 | base(null, url, null, null, null, pId, int.MaxValue) | 258 | base(null, url, null, null, null, null, pId, int.MaxValue) |
260 | { | 259 | { |
261 | m_module = module; | 260 | m_module = module; |
262 | 261 | ||
263 | HasEvents = (x, y) => { lock (responses) return responses.ContainsKey(x); }; | 262 | HasEvents = (x, y) => { lock (responses) return responses.ContainsKey(x); }; |
263 | |||
264 | Drop = (x, y) => | ||
265 | { | ||
266 | lock (responses) | ||
267 | { | ||
268 | responses.Remove(x); | ||
269 | lock(dropedResponses) | ||
270 | dropedResponses.Add(x); | ||
271 | } | ||
272 | }; | ||
273 | |||
264 | GetEvents = (x, y) => | 274 | GetEvents = (x, y) => |
265 | { | 275 | { |
266 | lock (responses) | 276 | lock (responses) |
@@ -285,8 +295,10 @@ namespace OpenSim.Region.ClientStack.Linden | |||
285 | reqinfo.reqID = x; | 295 | reqinfo.reqID = x; |
286 | reqinfo.request = y; | 296 | reqinfo.request = y; |
287 | reqinfo.presence = sp; | 297 | reqinfo.presence = sp; |
288 | reqinfo.folders = new List<UUID>(); | ||
289 | 298 | ||
299 | /* why where we doing this? just to get cof ? | ||
300 | List<UUID> folders = new List<UUID>(); | ||
301 | |||
290 | // Decode the request here | 302 | // Decode the request here |
291 | string request = y["body"].ToString(); | 303 | string request = y["body"].ToString(); |
292 | 304 | ||
@@ -322,11 +334,11 @@ namespace OpenSim.Region.ClientStack.Linden | |||
322 | UUID folderID; | 334 | UUID folderID; |
323 | if (UUID.TryParse(folder, out folderID)) | 335 | if (UUID.TryParse(folder, out folderID)) |
324 | { | 336 | { |
325 | if (!reqinfo.folders.Contains(folderID)) | 337 | if (!folders.Contains(folderID)) |
326 | { | 338 | { |
327 | if (sp.COF != UUID.Zero && sp.COF == folderID) | 339 | if (sp.COF != UUID.Zero && sp.COF == folderID) |
328 | highPriority = true; | 340 | highPriority = true; |
329 | reqinfo.folders.Add(folderID); | 341 | folders.Add(folderID); |
330 | } | 342 | } |
331 | } | 343 | } |
332 | } | 344 | } |
@@ -334,6 +346,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
334 | if (highPriority) | 346 | if (highPriority) |
335 | m_queue.PriorityEnqueue(reqinfo); | 347 | m_queue.PriorityEnqueue(reqinfo); |
336 | else | 348 | else |
349 | */ | ||
337 | m_queue.Enqueue(reqinfo); | 350 | m_queue.Enqueue(reqinfo); |
338 | }; | 351 | }; |
339 | 352 | ||
@@ -365,6 +378,19 @@ namespace OpenSim.Region.ClientStack.Linden | |||
365 | 378 | ||
366 | UUID requestID = requestinfo.reqID; | 379 | UUID requestID = requestinfo.reqID; |
367 | 380 | ||
381 | |||
382 | lock(responses) | ||
383 | { | ||
384 | lock(dropedResponses) | ||
385 | { | ||
386 | if(dropedResponses.Contains(requestID)) | ||
387 | { | ||
388 | dropedResponses.Remove(requestID); | ||
389 | return; | ||
390 | } | ||
391 | } | ||
392 | } | ||
393 | |||
368 | Hashtable response = new Hashtable(); | 394 | Hashtable response = new Hashtable(); |
369 | 395 | ||
370 | response["int_response_code"] = 200; | 396 | response["int_response_code"] = 200; |
@@ -377,11 +403,21 @@ namespace OpenSim.Region.ClientStack.Linden | |||
377 | 403 | ||
378 | lock (responses) | 404 | lock (responses) |
379 | { | 405 | { |
406 | lock(dropedResponses) | ||
407 | { | ||
408 | if(dropedResponses.Contains(requestID)) | ||
409 | { | ||
410 | dropedResponses.Remove(requestID); | ||
411 | requestinfo.request.Clear(); | ||
412 | WebFetchInvDescModule.ProcessedRequestsCount++; | ||
413 | return; | ||
414 | } | ||
415 | } | ||
416 | |||
380 | if (responses.ContainsKey(requestID)) | 417 | if (responses.ContainsKey(requestID)) |
381 | m_log.WarnFormat("[FETCH INVENTORY DESCENDENTS2 MODULE]: Caught in the act of loosing responses! Please report this on mantis #7054"); | 418 | m_log.WarnFormat("[FETCH INVENTORY DESCENDENTS2 MODULE]: Caught in the act of loosing responses! Please report this on mantis #7054"); |
382 | responses[requestID] = response; | 419 | responses[requestID] = response; |
383 | } | 420 | } |
384 | requestinfo.folders.Clear(); | ||
385 | requestinfo.request.Clear(); | 421 | requestinfo.request.Clear(); |
386 | WebFetchInvDescModule.ProcessedRequestsCount++; | 422 | WebFetchInvDescModule.ProcessedRequestsCount++; |
387 | } | 423 | } |
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index f563c68..c118f33 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | |||
@@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
225 | string uri = "/lslhttp/" + urlcode.ToString() + "/"; | 225 | string uri = "/lslhttp/" + urlcode.ToString() + "/"; |
226 | 226 | ||
227 | PollServiceEventArgs args | 227 | PollServiceEventArgs args |
228 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); | 228 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, Drop, urlcode, 25000); |
229 | args.Type = PollServiceEventArgs.EventType.LslHttp; | 229 | args.Type = PollServiceEventArgs.EventType.LslHttp; |
230 | m_HttpServer.AddPollServiceHTTPHandler(uri, args); | 230 | m_HttpServer.AddPollServiceHTTPHandler(uri, args); |
231 | 231 | ||
@@ -276,7 +276,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
276 | string uri = "/lslhttps/" + urlcode.ToString() + "/"; | 276 | string uri = "/lslhttps/" + urlcode.ToString() + "/"; |
277 | 277 | ||
278 | PollServiceEventArgs args | 278 | PollServiceEventArgs args |
279 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); | 279 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, Drop, urlcode, 25000); |
280 | args.Type = PollServiceEventArgs.EventType.LslHttp; | 280 | args.Type = PollServiceEventArgs.EventType.LslHttp; |
281 | m_HttpsServer.AddPollServiceHTTPHandler(uri, args); | 281 | m_HttpsServer.AddPollServiceHTTPHandler(uri, args); |
282 | 282 | ||
@@ -530,6 +530,28 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
530 | } | 530 | } |
531 | } | 531 | } |
532 | } | 532 | } |
533 | |||
534 | private void Drop(UUID requestID, UUID sessionID) | ||
535 | { | ||
536 | UrlData url = null; | ||
537 | lock (m_RequestMap) | ||
538 | { | ||
539 | if (m_RequestMap.ContainsKey(requestID)) | ||
540 | { | ||
541 | url = m_RequestMap[requestID]; | ||
542 | m_RequestMap.Remove(requestID); | ||
543 | if(url != null) | ||
544 | { | ||
545 | lock (url.requests) | ||
546 | { | ||
547 | if(url.requests.ContainsKey(requestID)) | ||
548 | url.requests.Remove(requestID); | ||
549 | } | ||
550 | } | ||
551 | } | ||
552 | } | ||
553 | } | ||
554 | |||
533 | private Hashtable GetEvents(UUID requestID, UUID sessionID) | 555 | private Hashtable GetEvents(UUID requestID, UUID sessionID) |
534 | { | 556 | { |
535 | UrlData url = null; | 557 | UrlData url = null; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs index 30dc4cd..1453204 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs | |||
@@ -87,7 +87,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
87 | uint port = 9999; | 87 | uint port = 9999; |
88 | MainServer.RemoveHttpServer(port); | 88 | MainServer.RemoveHttpServer(port); |
89 | 89 | ||
90 | BaseHttpServer server = new BaseHttpServer(port, false, 0, ""); | 90 | BaseHttpServer server = new BaseHttpServer(port, false, 0, "", "", ""); |
91 | MainServer.AddHttpServer(server); | 91 | MainServer.AddHttpServer(server); |
92 | MainServer.Instance = server; | 92 | MainServer.Instance = server; |
93 | 93 | ||