aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/Caps/EventQueue
diff options
context:
space:
mode:
authorMelanie Thielker2017-01-05 19:07:37 +0000
committerMelanie Thielker2017-01-05 19:07:37 +0000
commitb16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch)
tree6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/ClientStack/Linden/Caps/EventQueue
parentMake it possible to disable the bakes module in the way it is described in co... (diff)
downloadopensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip
opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz
opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2
opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz
Massive tab and trailing space cleanup
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs38
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs14
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs2
3 files changed, 27 insertions, 27 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
index ba3edd6..1feece1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
@@ -74,12 +74,12 @@ namespace OpenSim.Region.ClientStack.Linden
74 private const int SERVER_EQ_TIME_NO_EVENTS = VIEWER_TIMEOUT - (10 * 1000); 74 private const int SERVER_EQ_TIME_NO_EVENTS = VIEWER_TIMEOUT - (10 * 1000);
75 75
76 protected Scene m_scene; 76 protected Scene m_scene;
77 77
78 private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>(); 78 private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
79 79
80 private Dictionary<UUID, Queue<OSD>> queues = new Dictionary<UUID, Queue<OSD>>(); 80 private Dictionary<UUID, Queue<OSD>> queues = new Dictionary<UUID, Queue<OSD>>();
81 private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>(); 81 private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>();
82 82
83 #region INonSharedRegionModule methods 83 #region INonSharedRegionModule methods
84 public virtual void Initialise(IConfigSource config) 84 public virtual void Initialise(IConfigSource config)
85 { 85 {
@@ -170,7 +170,7 @@ namespace OpenSim.Region.ClientStack.Linden
170 foreach (KeyValuePair<UUID, Queue<OSD>> kvp in queues) 170 foreach (KeyValuePair<UUID, Queue<OSD>> kvp in queues)
171 { 171 {
172 MainConsole.Instance.OutputFormat( 172 MainConsole.Instance.OutputFormat(
173 "For agent {0} there are {1} messages queued for send.", 173 "For agent {0} there are {1} messages queued for send.",
174 kvp.Key, kvp.Value.Count); 174 kvp.Key, kvp.Value.Count);
175 } 175 }
176 } 176 }
@@ -189,7 +189,7 @@ namespace OpenSim.Region.ClientStack.Linden
189 { 189 {
190 if (DebugLevel > 0) 190 if (DebugLevel > 0)
191 m_log.DebugFormat( 191 m_log.DebugFormat(
192 "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", 192 "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}",
193 agentId, m_scene.RegionInfo.RegionName); 193 agentId, m_scene.RegionInfo.RegionName);
194 194
195 queues[agentId] = new Queue<OSD>(); 195 queues[agentId] = new Queue<OSD>();
@@ -238,13 +238,13 @@ namespace OpenSim.Region.ClientStack.Linden
238 "[EVENTQUEUE]: (Enqueue) No queue found for agent {0} when placing message {1} in region {2}", 238 "[EVENTQUEUE]: (Enqueue) No queue found for agent {0} when placing message {1} in region {2}",
239 avatarID, evMap["message"], m_scene.Name); 239 avatarID, evMap["message"], m_scene.Name);
240 } 240 }
241 } 241 }
242 catch (NullReferenceException e) 242 catch (NullReferenceException e)
243 { 243 {
244 m_log.Error("[EVENTQUEUE] Caught exception: " + e); 244 m_log.Error("[EVENTQUEUE] Caught exception: " + e);
245 return false; 245 return false;
246 } 246 }
247 247
248 return true; 248 return true;
249 } 249 }
250 250
@@ -309,10 +309,10 @@ namespace OpenSim.Region.ClientStack.Linden
309 309
310 // push markers to handle old responses still waiting 310 // push markers to handle old responses still waiting
311 // this will cost at most viewer getting two forced noevents 311 // this will cost at most viewer getting two forced noevents
312 // even being a new queue better be safe 312 // even being a new queue better be safe
313 queue.Enqueue(null); 313 queue.Enqueue(null);
314 queue.Enqueue(null); // one should be enough 314 queue.Enqueue(null); // one should be enough
315 315
316 lock (m_AvatarQueueUUIDMapping) 316 lock (m_AvatarQueueUUIDMapping)
317 { 317 {
318 eventQueueGetUUID = UUID.Random(); 318 eventQueueGetUUID = UUID.Random();
@@ -336,7 +336,7 @@ namespace OpenSim.Region.ClientStack.Linden
336 { 336 {
337 // push markers to handle old responses still waiting 337 // push markers to handle old responses still waiting
338 // this will cost at most viewer getting two forced noevents 338 // this will cost at most viewer getting two forced noevents
339 // even being a new queue better be safe 339 // even being a new queue better be safe
340 queue.Enqueue(null); 340 queue.Enqueue(null);
341 queue.Enqueue(null); // one should be enough 341 queue.Enqueue(null); // one should be enough
342 342
@@ -405,7 +405,7 @@ namespace OpenSim.Region.ClientStack.Linden
405 } 405 }
406 public void Drop(UUID requestID, UUID pAgentId) 406 public void Drop(UUID requestID, UUID pAgentId)
407 { 407 {
408 // do nothing for now, hope client close will do it 408 // do nothing for now, hope client close will do it
409 } 409 }
410 410
411 public Hashtable GetEvents(UUID requestID, UUID pAgentId) 411 public Hashtable GetEvents(UUID requestID, UUID pAgentId)
@@ -437,7 +437,7 @@ namespace OpenSim.Region.ClientStack.Linden
437 negativeID = true; 437 negativeID = true;
438 thisID = -thisID; 438 thisID = -thisID;
439 } 439 }
440 440
441 while (queue.Count > 0) 441 while (queue.Count > 0)
442 { 442 {
443 element = queue.Dequeue(); 443 element = queue.Dequeue();
@@ -477,7 +477,7 @@ namespace OpenSim.Region.ClientStack.Linden
477 // if there where no elements before a marker send a NoEvents 477 // if there where no elements before a marker send a NoEvents
478 if (array.Count == 0) 478 if (array.Count == 0)
479 return NoEvents(requestID, pAgentId); 479 return NoEvents(requestID, pAgentId);
480 480
481 Hashtable responsedata = new Hashtable(); 481 Hashtable responsedata = new Hashtable();
482 responsedata["int_response_code"] = 200; 482 responsedata["int_response_code"] = 200;
483 responsedata["content_type"] = "application/xml"; 483 responsedata["content_type"] = "application/xml";
@@ -500,7 +500,7 @@ namespace OpenSim.Region.ClientStack.Linden
500 responsedata["http_protocol_version"] = "HTTP/1.0"; 500 responsedata["http_protocol_version"] = "HTTP/1.0";
501 return responsedata; 501 return responsedata;
502 } 502 }
503 503
504 public void DisableSimulator(ulong handle, UUID avatarID) 504 public void DisableSimulator(ulong handle, UUID avatarID)
505 { 505 {
506 OSD item = EventQueueHelper.DisableSimulator(handle); 506 OSD item = EventQueueHelper.DisableSimulator(handle);
@@ -518,7 +518,7 @@ namespace OpenSim.Region.ClientStack.Linden
518 } 518 }
519 519
520 public virtual void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, string capsPath, 520 public virtual void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, string capsPath,
521 ulong regionHandle, int regionSizeX, int regionSizeY) 521 ulong regionHandle, int regionSizeX, int regionSizeY)
522 { 522 {
523 if (DebugLevel > 0) 523 if (DebugLevel > 0)
524 m_log.DebugFormat("{0} EstablishAgentCommunication. handle={1}, endPoint={2}, avatarID={3}", 524 m_log.DebugFormat("{0} EstablishAgentCommunication. handle={1}, endPoint={2}, avatarID={3}",
@@ -528,9 +528,9 @@ namespace OpenSim.Region.ClientStack.Linden
528 Enqueue(item, avatarID); 528 Enqueue(item, avatarID);
529 } 529 }
530 530
531 public virtual void TeleportFinishEvent(ulong regionHandle, byte simAccess, 531 public virtual void TeleportFinishEvent(ulong regionHandle, byte simAccess,
532 IPEndPoint regionExternalEndPoint, 532 IPEndPoint regionExternalEndPoint,
533 uint locationID, uint flags, string capsURL, 533 uint locationID, uint flags, string capsURL,
534 UUID avatarID, int regionSizeX, int regionSizeY) 534 UUID avatarID, int regionSizeX, int regionSizeY)
535 { 535 {
536 if (DebugLevel > 0) 536 if (DebugLevel > 0)
@@ -560,15 +560,15 @@ namespace OpenSim.Region.ClientStack.Linden
560 uint timeStamp, bool offline, int parentEstateID, Vector3 position, 560 uint timeStamp, bool offline, int parentEstateID, Vector3 position,
561 uint ttl, UUID transactionID, bool fromGroup, byte[] binaryBucket) 561 uint ttl, UUID transactionID, bool fromGroup, byte[] binaryBucket)
562 { 562 {
563 OSD item = EventQueueHelper.ChatterboxInvitation(sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog, 563 OSD item = EventQueueHelper.ChatterboxInvitation(sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog,
564 timeStamp, offline, parentEstateID, position, ttl, transactionID, 564 timeStamp, offline, parentEstateID, position, ttl, transactionID,
565 fromGroup, binaryBucket); 565 fromGroup, binaryBucket);
566 Enqueue(item, toAgent); 566 Enqueue(item, toAgent);
567 //m_log.InfoFormat("########### eq ChatterboxInvitation #############\n{0}", item); 567 //m_log.InfoFormat("########### eq ChatterboxInvitation #############\n{0}", item);
568 568
569 } 569 }
570 570
571 public void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID toAgent, bool canVoiceChat, 571 public void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID toAgent, bool canVoiceChat,
572 bool isModerator, bool textMute, bool isEnterorLeave) 572 bool isModerator, bool textMute, bool isEnterorLeave)
573 { 573 {
574 OSD item = EventQueueHelper.ChatterBoxSessionAgentListUpdates(sessionID, fromAgent, canVoiceChat, 574 OSD item = EventQueueHelper.ChatterBoxSessionAgentListUpdates(sessionID, fromAgent, canVoiceChat,
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
index 5e0bd71..e1e88ae 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
@@ -105,7 +105,7 @@ namespace OpenSim.Region.ClientStack.Linden
105 105
106 return BuildEvent("DisableSimulator", llsdBody); 106 return BuildEvent("DisableSimulator", llsdBody);
107 } 107 }
108 108
109 public static OSD CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt, 109 public static OSD CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt,
110 IPEndPoint newRegionExternalEndPoint, 110 IPEndPoint newRegionExternalEndPoint,
111 string capsURL, UUID agentID, UUID sessionID, 111 string capsURL, UUID agentID, UUID sessionID,
@@ -194,13 +194,13 @@ namespace OpenSim.Region.ClientStack.Linden
194 script.Add("ItemID", OSD.FromUUID(itemID)); 194 script.Add("ItemID", OSD.FromUUID(itemID));
195 script.Add("Running", OSD.FromBoolean(running)); 195 script.Add("Running", OSD.FromBoolean(running));
196 script.Add("Mono", OSD.FromBoolean(mono)); 196 script.Add("Mono", OSD.FromBoolean(mono));
197 197
198 OSDArray scriptArr = new OSDArray(); 198 OSDArray scriptArr = new OSDArray();
199 scriptArr.Add(script); 199 scriptArr.Add(script);
200 200
201 OSDMap body = new OSDMap(); 201 OSDMap body = new OSDMap();
202 body.Add("Script", scriptArr); 202 body.Add("Script", scriptArr);
203 203
204 return BuildEvent("ScriptRunningReply", body); 204 return BuildEvent("ScriptRunningReply", body);
205 } 205 }
206 206
@@ -243,7 +243,7 @@ namespace OpenSim.Region.ClientStack.Linden
243 { 243 {
244 OSDMap messageParams = new OSDMap(15); 244 OSDMap messageParams = new OSDMap(15);
245 messageParams.Add("type", new OSDInteger((int)dialog)); 245 messageParams.Add("type", new OSDInteger((int)dialog));
246 246
247 OSDArray positionArray = new OSDArray(3); 247 OSDArray positionArray = new OSDArray(3);
248 positionArray.Add(OSD.FromReal(position.X)); 248 positionArray.Add(OSD.FromReal(position.X));
249 positionArray.Add(OSD.FromReal(position.Y)); 249 positionArray.Add(OSD.FromReal(position.Y));
@@ -423,7 +423,7 @@ namespace OpenSim.Region.ClientStack.Linden
423 QueryDataMap.Add("SnapShotID", OSD.FromUUID(groupDataBlock.SnapshotID)); 423 QueryDataMap.Add("SnapShotID", OSD.FromUUID(groupDataBlock.SnapshotID));
424 QueryDataMap.Add("ProductSku", OSD.FromInteger(0)); 424 QueryDataMap.Add("ProductSku", OSD.FromInteger(0));
425 QueryDataMap.Add("Price", OSD.FromInteger(groupDataBlock.Price)); 425 QueryDataMap.Add("Price", OSD.FromInteger(groupDataBlock.Price));
426 426
427 QueryData.Add(QueryDataMap); 427 QueryData.Add(QueryDataMap);
428 } 428 }
429 body.Add("QueryData", QueryData); 429 body.Add("QueryData", QueryData);
@@ -444,7 +444,7 @@ namespace OpenSim.Region.ClientStack.Linden
444 public static OSD partPhysicsProperties(uint localID, byte physhapetype, 444 public static OSD partPhysicsProperties(uint localID, byte physhapetype,
445 float density, float friction, float bounce, float gravmod) 445 float density, float friction, float bounce, float gravmod)
446 { 446 {
447 447
448 OSDMap physinfo = new OSDMap(6); 448 OSDMap physinfo = new OSDMap(6);
449 physinfo["LocalID"] = localID; 449 physinfo["LocalID"] = localID;
450 physinfo["Density"] = density; 450 physinfo["Density"] = density;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
index 1e629bd..ee3f4f1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
@@ -180,7 +180,7 @@ namespace OpenSim.Region.ClientStack.Linden.Tests
180 TestHelpers.InMethod(); 180 TestHelpers.InMethod();
181// TestHelpers.EnableLogging(); 181// TestHelpers.EnableLogging();
182 182
183 UUID npcId 183 UUID npcId
184 = m_npcMod.CreateNPC( 184 = m_npcMod.CreateNPC(
185 "John", "Smith", new Vector3(128, 128, 30), UUID.Zero, true, m_scene, new AvatarAppearance()); 185 "John", "Smith", new Vector3(128, 128, 30), UUID.Zero, true, m_scene, new AvatarAppearance());
186 186