diff options
author | John Hurliman | 2009-09-30 15:28:23 -0700 |
---|---|---|
committer | John Hurliman | 2009-09-30 15:28:23 -0700 |
commit | acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009 (patch) | |
tree | 305349e1bd0a5849fd7f96483e24d5e07b24b8f4 /OpenSim/Region/CoreModules/Framework/EventQueue | |
parent | * Adding Scale to EntityBase * Fixing the incorrect initialization of EntityB... (diff) | |
parent | Formatting cleanup. (diff) | |
download | opensim-SC_OLD-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.zip opensim-SC_OLD-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.tar.gz opensim-SC_OLD-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.tar.bz2 opensim-SC_OLD-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EventQueue')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs index 34d46a0..1b23d92 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs | |||
@@ -316,7 +316,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
316 | 316 | ||
317 | // This will persist this beyond the expiry of the caps handlers | 317 | // This will persist this beyond the expiry of the caps handlers |
318 | MainServer.Instance.AddPollServiceHTTPHandler( | 318 | MainServer.Instance.AddPollServiceHTTPHandler( |
319 | capsBase + EventQueueGetUUID.ToString() + "/", EventQueuePath2, new PollServiceEventArgs(HasEvents, GetEvents, NoEvents, agentID)); | 319 | capsBase + EventQueueGetUUID.ToString() + "/", EventQueuePoll, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID)); |
320 | 320 | ||
321 | Random rnd = new Random(Environment.TickCount); | 321 | Random rnd = new Random(Environment.TickCount); |
322 | lock (m_ids) | 322 | lock (m_ids) |
@@ -326,7 +326,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
326 | } | 326 | } |
327 | } | 327 | } |
328 | 328 | ||
329 | public bool HasEvents(UUID agentID) | 329 | public bool HasEvents(UUID requestID, UUID agentID) |
330 | { | 330 | { |
331 | // Don't use this, because of race conditions at agent closing time | 331 | // Don't use this, because of race conditions at agent closing time |
332 | //Queue<OSD> queue = TryGetQueue(agentID); | 332 | //Queue<OSD> queue = TryGetQueue(agentID); |
@@ -343,14 +343,14 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
343 | return false; | 343 | return false; |
344 | } | 344 | } |
345 | 345 | ||
346 | public Hashtable GetEvents(UUID pAgentId, string request) | 346 | public Hashtable GetEvents(UUID requestID, UUID pAgentId, string request) |
347 | { | 347 | { |
348 | Queue<OSD> queue = TryGetQueue(pAgentId); | 348 | Queue<OSD> queue = TryGetQueue(pAgentId); |
349 | OSD element; | 349 | OSD element; |
350 | lock (queue) | 350 | lock (queue) |
351 | { | 351 | { |
352 | if (queue.Count == 0) | 352 | if (queue.Count == 0) |
353 | return NoEvents(); | 353 | return NoEvents(requestID, pAgentId); |
354 | element = queue.Dequeue(); // 15s timeout | 354 | element = queue.Dequeue(); // 15s timeout |
355 | } | 355 | } |
356 | 356 | ||
@@ -398,7 +398,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
398 | //m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]); | 398 | //m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]); |
399 | } | 399 | } |
400 | 400 | ||
401 | public Hashtable NoEvents() | 401 | public Hashtable NoEvents(UUID requestID, UUID agentID) |
402 | { | 402 | { |
403 | Hashtable responsedata = new Hashtable(); | 403 | Hashtable responsedata = new Hashtable(); |
404 | responsedata["int_response_code"] = 502; | 404 | responsedata["int_response_code"] = 502; |
@@ -454,7 +454,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
454 | responsedata["error_status_text"] = "Upstream error:"; | 454 | responsedata["error_status_text"] = "Upstream error:"; |
455 | responsedata["http_protocol_version"] = "HTTP/1.0"; | 455 | responsedata["http_protocol_version"] = "HTTP/1.0"; |
456 | return responsedata; | 456 | return responsedata; |
457 | } | 457 | } |
458 | 458 | ||
459 | OSDArray array = new OSDArray(); | 459 | OSDArray array = new OSDArray(); |
460 | if (element == null) // didn't have an event in 15s | 460 | if (element == null) // didn't have an event in 15s |
@@ -491,6 +491,11 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
491 | return responsedata; | 491 | return responsedata; |
492 | } | 492 | } |
493 | 493 | ||
494 | public Hashtable EventQueuePoll(Hashtable request) | ||
495 | { | ||
496 | return new Hashtable(); | ||
497 | } | ||
498 | |||
494 | public Hashtable EventQueuePath2(Hashtable request) | 499 | public Hashtable EventQueuePath2(Hashtable request) |
495 | { | 500 | { |
496 | string capuuid = (string)request["uri"]; //path.Replace("/CAPS/EQG/",""); | 501 | string capuuid = (string)request["uri"]; //path.Replace("/CAPS/EQG/",""); |