aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs30
1 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
index 3fc8005..c532ac0 100644
--- a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
+++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
@@ -44,18 +44,18 @@ using OpenSim.Region.Environment.Interfaces;
44using OpenSim.Region.Interfaces; 44using OpenSim.Region.Interfaces;
45using OpenSim.Region.Environment.Scenes; 45using OpenSim.Region.Environment.Scenes;
46 46
47using OSD = OpenMetaverse.StructuredData.OSD; 47using LLSD = OpenMetaverse.StructuredData.LLSD;
48using OSDMap = OpenMetaverse.StructuredData.OSDMap; 48using LLSDMap = OpenMetaverse.StructuredData.LLSDMap;
49using OSDArray = OpenMetaverse.StructuredData.OSDArray; 49using LLSDArray = OpenMetaverse.StructuredData.LLSDArray;
50using Caps = OpenSim.Framework.Communications.Capabilities.Caps; 50using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
51using BlockingLLSDQueue = OpenSim.Framework.BlockingQueue<OpenMetaverse.StructuredData.OSD>; 51using BlockingLLSDQueue = OpenSim.Framework.BlockingQueue<OpenMetaverse.StructuredData.LLSD>;
52 52
53namespace OpenSim.Region.Environment.Modules.Framework 53namespace OpenSim.Region.Environment.Modules.Framework
54{ 54{
55 public struct QueueItem 55 public struct QueueItem
56 { 56 {
57 public int id; 57 public int id;
58 public OSDMap body; 58 public LLSDMap body;
59 } 59 }
60 60
61 public class EventQueueGetModule : IEventQueue, IRegionModule 61 public class EventQueueGetModule : IEventQueue, IRegionModule
@@ -146,7 +146,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
146 146
147 147
148 #region IEventQueue Members 148 #region IEventQueue Members
149 public bool Enqueue(OSD ev, UUID avatarID) 149 public bool Enqueue(LLSD ev, UUID avatarID)
150 { 150 {
151 m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName); 151 m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName);
152 try 152 try
@@ -308,7 +308,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
308// } 308// }
309 309
310 BlockingLLSDQueue queue = GetQueue(agentID); 310 BlockingLLSDQueue queue = GetQueue(agentID);
311 OSD element = queue.Dequeue(15000); // 15s timeout 311 LLSD element = queue.Dequeue(15000); // 15s timeout
312 312
313 Hashtable responsedata = new Hashtable(); 313 Hashtable responsedata = new Hashtable();
314 314
@@ -337,7 +337,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
337 337
338 338
339 339
340 OSDArray array = new OSDArray(); 340 LLSDArray array = new LLSDArray();
341 if (element == null) // didn't have an event in 15s 341 if (element == null) // didn't have an event in 15s
342 { 342 {
343 // Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say! 343 // Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say!
@@ -354,10 +354,10 @@ namespace OpenSim.Region.Environment.Modules.Framework
354 } 354 }
355 } 355 }
356 356
357 OSDMap events = new OSDMap(); 357 LLSDMap events = new LLSDMap();
358 events.Add("events", array); 358 events.Add("events", array);
359 359
360 events.Add("id", new OSDInteger(thisID)); 360 events.Add("id", new LLSDInteger(thisID));
361 lock (m_ids) 361 lock (m_ids)
362 { 362 {
363 m_ids[agentID] = thisID + 1; 363 m_ids[agentID] = thisID + 1;
@@ -366,7 +366,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
366 responsedata["int_response_code"] = 200; 366 responsedata["int_response_code"] = 200;
367 responsedata["content_type"] = "application/xml"; 367 responsedata["content_type"] = "application/xml";
368 responsedata["keepalive"] = false; 368 responsedata["keepalive"] = false;
369 responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events); 369 responsedata["str_response_string"] = LLSDParser.SerializeXmlString(events);
370 m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]); 370 m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
371 371
372 return responsedata; 372 return responsedata;
@@ -424,7 +424,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
424 424
425 } 425 }
426 426
427 public OSD EventQueueFallBack(string path, OSD request, string endpoint) 427 public LLSD EventQueueFallBack(string path, LLSD request, string endpoint)
428 { 428 {
429 // This is a fallback element to keep the client from loosing EventQueueGet 429 // This is a fallback element to keep the client from loosing EventQueueGet
430 // Why does CAPS fail sometimes!? 430 // Why does CAPS fail sometimes!?
@@ -473,7 +473,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
473 thisID = m_ids[AvatarID]; 473 thisID = m_ids[AvatarID];
474 474
475 BlockingLLSDQueue queue = GetQueue(AvatarID); 475 BlockingLLSDQueue queue = GetQueue(AvatarID);
476 OSDArray array = new OSDArray(); 476 LLSDArray array = new LLSDArray();
477 LLSD element = queue.Dequeue(15000); // 15s timeout 477 LLSD element = queue.Dequeue(15000); // 15s timeout
478 if (element == null) 478 if (element == null)
479 { 479 {
@@ -489,7 +489,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
489 thisID++; 489 thisID++;
490 } 490 }
491 } 491 }
492 OSDMap events = new OSDMap(); 492 LLSDMap events = new LLSDMap();
493 events.Add("events", array); 493 events.Add("events", array);
494 494
495 events.Add("id", new LLSDInteger(thisID)); 495 events.Add("id", new LLSDInteger(thisID));
@@ -512,7 +512,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
512 { 512 {
513 //return new LLSD(); 513 //return new LLSD();
514 } 514 }
515 return new OSDString("shutdown404!"); 515 return new LLSDString("shutdown404!");
516 } 516 }
517 } 517 }
518} 518}