aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Framework
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-01-06 21:39:55 +0000
committerJustin Clarke Casey2009-01-06 21:39:55 +0000
commita31792ee5cb1ce619f21f5b428926c4709c3f14b (patch)
treef82a09b918c277741c97fdf4dca85fe1bd8463ac /OpenSim/Region/Environment/Modules/Framework
parent* Rename GetRandomCapsPath() to GetRandomCapsObjectPath() to fit in with term... (diff)
downloadopensim-SC_OLD-a31792ee5cb1ce619f21f5b428926c4709c3f14b.zip
opensim-SC_OLD-a31792ee5cb1ce619f21f5b428926c4709c3f14b.tar.gz
opensim-SC_OLD-a31792ee5cb1ce619f21f5b428926c4709c3f14b.tar.bz2
opensim-SC_OLD-a31792ee5cb1ce619f21f5b428926c4709c3f14b.tar.xz
* prune and regrade log messages relating to client login and logout
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Framework')
-rw-r--r--OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs48
1 files changed, 21 insertions, 27 deletions
diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs
index 9006fe0..3f46e95 100644
--- a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs
@@ -72,7 +72,6 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
72 private Dictionary<UUID, BlockingLLSDQueue> queues = new Dictionary<UUID, BlockingLLSDQueue>(); 72 private Dictionary<UUID, BlockingLLSDQueue> queues = new Dictionary<UUID, BlockingLLSDQueue>();
73 private Dictionary<UUID, UUID> m_QueueUUIDAvatarMapping = new Dictionary<UUID, UUID>(); 73 private Dictionary<UUID, UUID> m_QueueUUIDAvatarMapping = new Dictionary<UUID, UUID>();
74 private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>(); 74 private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>();
75
76 75
77 #region IRegionModule methods 76 #region IRegionModule methods
78 public void Initialise(Scene scene, IConfigSource config) 77 public void Initialise(Scene scene, IConfigSource config)
@@ -101,11 +100,8 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
101 // circuit is there. 100 // circuit is there.
102 101
103 scene.EventManager.OnClientClosed += ClientClosed; 102 scene.EventManager.OnClientClosed += ClientClosed;
104 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
105 scene.EventManager.OnMakeChildAgent += MakeChildAgent; 103 scene.EventManager.OnMakeChildAgent += MakeChildAgent;
106 scene.EventManager.OnRegisterCaps += OnRegisterCaps; 104 scene.EventManager.OnRegisterCaps += OnRegisterCaps;
107
108 m_log.DebugFormat("[EVENTQUEUE]: Enabled EventQueueGetModule for region {0}", scene.RegionInfo.RegionName);
109 } 105 }
110 else 106 else
111 { 107 {
@@ -149,10 +145,13 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
149 { 145 {
150 if (!queues.ContainsKey(agentId)) 146 if (!queues.ContainsKey(agentId))
151 { 147 {
152 m_log.DebugFormat("[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", agentId, 148 m_log.DebugFormat(
153 m_scene.RegionInfo.RegionName); 149 "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}",
150 agentId, m_scene.RegionInfo.RegionName);
151
154 queues[agentId] = new BlockingLLSDQueue(); 152 queues[agentId] = new BlockingLLSDQueue();
155 } 153 }
154
156 return queues[agentId]; 155 return queues[agentId];
157 } 156 }
158 } 157 }
@@ -179,17 +178,19 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
179 178
180 public bool Enqueue(OSD ev, UUID avatarID) 179 public bool Enqueue(OSD ev, UUID avatarID)
181 { 180 {
182 m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName); 181 //m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName);
183 try 182 try
184 { 183 {
185 BlockingLLSDQueue queue = GetQueue(avatarID); 184 BlockingLLSDQueue queue = GetQueue(avatarID);
186 if (queue != null) 185 if (queue != null)
187 queue.Enqueue(ev); 186 queue.Enqueue(ev);
188 } catch(NullReferenceException e) 187 }
188 catch(NullReferenceException e)
189 { 189 {
190 m_log.Debug("[EVENTQUEUE] Caught exception: " + e); 190 m_log.Error("[EVENTQUEUE] Caught exception: " + e);
191 return false; 191 return false;
192 } 192 }
193
193 return true; 194 return true;
194 } 195 }
195 196
@@ -234,7 +235,6 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
234 { 235 {
235 m_AvatarQueueUUIDMapping.Remove(ky); 236 m_AvatarQueueUUIDMapping.Remove(ky);
236 m_scene.CommsManager.HttpServer.RemoveHTTPHandler("","/CAPS/EQG/" + ky.ToString() + "/"); 237 m_scene.CommsManager.HttpServer.RemoveHTTPHandler("","/CAPS/EQG/" + ky.ToString() + "/");
237 m_log.Debug("[EVENTQUEUE]: Removing " + "/CAPS/EQG/" + ky.ToString() + "/");
238 } 238 }
239 239
240 } 240 }
@@ -258,14 +258,6 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
258 m_QueueUUIDAvatarMapping.Remove(ky); 258 m_QueueUUIDAvatarMapping.Remove(ky);
259 259
260 } 260 }
261
262 m_log.DebugFormat("[EVENTQUEUE]: Client {0} deregistered in region {1}.", AgentID, m_scene.RegionInfo.RegionName);
263 }
264
265 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
266 {
267 m_log.DebugFormat("[EVENTQUEUE]: Avatar {0} entering parcel {1} in region {2}.",
268 avatar.UUID, localLandID, m_scene.RegionInfo.RegionName);
269 } 261 }
270 262
271 private void MakeChildAgent(ScenePresence avatar) 263 private void MakeChildAgent(ScenePresence avatar)
@@ -283,7 +275,11 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
283 275
284 public void OnRegisterCaps(UUID agentID, Caps caps) 276 public void OnRegisterCaps(UUID agentID, Caps caps)
285 { 277 {
286 m_log.DebugFormat("[EVENTQUEUE] OnRegisterCaps: agentID {0} caps {1} region {2}", agentID, caps, m_scene.RegionInfo.RegionName); 278 // Register an event queue for the client
279
280 //m_log.DebugFormat(
281 // "[EVENTQUEUE]: OnRegisterCaps: agentID {0} caps {1} region {2}",
282 // agentID, caps, m_scene.RegionInfo.RegionName);
287 283
288 // Let's instantiate a Queue for this agent right now 284 // Let's instantiate a Queue for this agent right now
289 TryGetQueue(agentID); 285 TryGetQueue(agentID);
@@ -302,7 +298,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
302 else 298 else
303 { 299 {
304 EventQueueGetUUID = UUID.Random(); 300 EventQueueGetUUID = UUID.Random();
305 m_log.DebugFormat("[EVENTQUEUE]: Using random UUID!"); 301 //m_log.DebugFormat("[EVENTQUEUE]: Using random UUID!");
306 } 302 }
307 } 303 }
308 304
@@ -318,13 +314,12 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
318 m_AvatarQueueUUIDMapping.Add(agentID, EventQueueGetUUID); 314 m_AvatarQueueUUIDMapping.Add(agentID, EventQueueGetUUID);
319 } 315 }
320 316
321 m_log.DebugFormat("[EVENTQUEUE]: CAPS URL: {0}", capsBase + EventQueueGetUUID.ToString() + "/");
322 // Register this as a caps handler 317 // Register this as a caps handler
323 caps.RegisterHandler("EventQueueGet", 318 caps.RegisterHandler("EventQueueGet",
324 new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/", 319 new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/",
325 delegate(Hashtable m_dhttpMethod) 320 delegate(Hashtable m_dhttpMethod)
326 { 321 {
327 return ProcessQueue(m_dhttpMethod,agentID, caps); 322 return ProcessQueue(m_dhttpMethod, agentID, caps);
328 })); 323 }));
329 324
330 // This will persist this beyond the expiry of the caps handlers 325 // This will persist this beyond the expiry of the caps handlers
@@ -339,7 +334,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
339 } 334 }
340 } 335 }
341 336
342 public Hashtable ProcessQueue(Hashtable request,UUID agentID, Caps caps) 337 public Hashtable ProcessQueue(Hashtable request, UUID agentID, Caps caps)
343 { 338 {
344 // TODO: this has to be redone to not busy-wait (and block the thread), 339 // TODO: this has to be redone to not busy-wait (and block the thread),
345 // TODO: as soon as we have a non-blocking way to handle HTTP-requests. 340 // TODO: as soon as we have a non-blocking way to handle HTTP-requests.
@@ -382,9 +377,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
382 responsedata["error_status_text"] = "Upstream error:"; 377 responsedata["error_status_text"] = "Upstream error:";
383 responsedata["http_protocol_version"] = "HTTP/1.0"; 378 responsedata["http_protocol_version"] = "HTTP/1.0";
384 return responsedata; 379 return responsedata;
385 } 380 }
386
387
388 381
389 OSDArray array = new OSDArray(); 382 OSDArray array = new OSDArray();
390 if (element == null) // didn't have an event in 15s 383 if (element == null) // didn't have an event in 15s
@@ -416,7 +409,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
416 responsedata["content_type"] = "application/xml"; 409 responsedata["content_type"] = "application/xml";
417 responsedata["keepalive"] = false; 410 responsedata["keepalive"] = false;
418 responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events); 411 responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events);
419 m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]); 412 //m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
420 413
421 return responsedata; 414 return responsedata;
422 } 415 }
@@ -561,6 +554,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
561 { 554 {
562 //return new LLSD(); 555 //return new LLSD();
563 } 556 }
557
564 return new OSDString("shutdown404!"); 558 return new OSDString("shutdown404!");
565 } 559 }
566 } 560 }