diff options
author | Diva Canto | 2009-10-01 09:17:22 -0700 |
---|---|---|
committer | Diva Canto | 2009-10-01 09:17:22 -0700 |
commit | 94783e937746d64396ad57271e0e6f3c9432a2d5 (patch) | |
tree | 7572c7281720cbd2e435184737e9f80747743133 /OpenSim/Grid | |
parent | - adding new LandDataSerializer testcase to "test-xml" target as well (diff) | |
download | opensim-SC_OLD-94783e937746d64396ad57271e0e6f3c9432a2d5.zip opensim-SC_OLD-94783e937746d64396ad57271e0e6f3c9432a2d5.tar.gz opensim-SC_OLD-94783e937746d64396ad57271e0e6f3c9432a2d5.tar.bz2 opensim-SC_OLD-94783e937746d64396ad57271e0e6f3c9432a2d5.tar.xz |
Catch and print exceptions in MessagingService, to diagnose mysterious disappearances of the Messaging server.
Diffstat (limited to 'OpenSim/Grid')
-rw-r--r-- | OpenSim/Grid/MessagingServer.Modules/MessageService.cs | 86 |
1 files changed, 51 insertions, 35 deletions
diff --git a/OpenSim/Grid/MessagingServer.Modules/MessageService.cs b/OpenSim/Grid/MessagingServer.Modules/MessageService.cs index 6f2c1ba..df5eaab 100644 --- a/OpenSim/Grid/MessagingServer.Modules/MessageService.cs +++ b/OpenSim/Grid/MessagingServer.Modules/MessageService.cs | |||
@@ -324,44 +324,53 @@ namespace OpenSim.Grid.MessagingServer.Modules | |||
324 | /// <returns></returns> | 324 | /// <returns></returns> |
325 | public XmlRpcResponse UserLoggedOn(XmlRpcRequest request, IPEndPoint remoteClient) | 325 | public XmlRpcResponse UserLoggedOn(XmlRpcRequest request, IPEndPoint remoteClient) |
326 | { | 326 | { |
327 | Hashtable requestData = (Hashtable)request.Params[0]; | 327 | try |
328 | { | ||
329 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
330 | |||
331 | AgentCircuitData agentData = new AgentCircuitData(); | ||
332 | agentData.SessionID = new UUID((string)requestData["sessionid"]); | ||
333 | agentData.SecureSessionID = new UUID((string)requestData["secure_session_id"]); | ||
334 | agentData.firstname = (string)requestData["firstname"]; | ||
335 | agentData.lastname = (string)requestData["lastname"]; | ||
336 | agentData.AgentID = new UUID((string)requestData["agentid"]); | ||
337 | agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); | ||
338 | agentData.CapsPath = (string)requestData["caps_path"]; | ||
339 | |||
340 | if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1")) | ||
341 | { | ||
342 | agentData.child = true; | ||
343 | } | ||
344 | else | ||
345 | { | ||
346 | agentData.startpos = | ||
347 | new Vector3(Convert.ToSingle(requestData["positionx"]), | ||
348 | Convert.ToSingle(requestData["positiony"]), | ||
349 | Convert.ToSingle(requestData["positionz"])); | ||
350 | agentData.child = false; | ||
351 | } | ||
328 | 352 | ||
329 | AgentCircuitData agentData = new AgentCircuitData(); | 353 | ulong regionHandle = Convert.ToUInt64((string)requestData["regionhandle"]); |
330 | agentData.SessionID = new UUID((string)requestData["sessionid"]); | 354 | |
331 | agentData.SecureSessionID = new UUID((string)requestData["secure_session_id"]); | 355 | m_log.InfoFormat("[LOGON]: User {0} {1} logged into region {2} as {3} agent, building indexes for user", |
332 | agentData.firstname = (string)requestData["firstname"]; | 356 | agentData.firstname, agentData.lastname, regionHandle, agentData.child ? "child" : "root"); |
333 | agentData.lastname = (string)requestData["lastname"]; | 357 | |
334 | agentData.AgentID = new UUID((string)requestData["agentid"]); | 358 | UserPresenceData up = new UserPresenceData(); |
335 | agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); | 359 | up.agentData = agentData; |
336 | agentData.CapsPath = (string)requestData["caps_path"]; | 360 | up.friendData = GetUserFriendList(agentData.AgentID); |
361 | up.regionData = m_regionModule.GetRegionInfo(regionHandle); | ||
362 | up.OnlineYN = true; | ||
363 | up.lookupUserRegionYN = false; | ||
364 | ProcessFriendListSubscriptions(up); | ||
337 | 365 | ||
338 | if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1")) | ||
339 | { | ||
340 | agentData.child = true; | ||
341 | } | 366 | } |
342 | else | 367 | catch (Exception e) |
343 | { | 368 | { |
344 | agentData.startpos = | 369 | m_log.WarnFormat("[LOGIN]: Exception on UserLoggedOn: {0}", e); |
345 | new Vector3(Convert.ToSingle(requestData["positionx"]), | ||
346 | Convert.ToSingle(requestData["positiony"]), | ||
347 | Convert.ToSingle(requestData["positionz"])); | ||
348 | agentData.child = false; | ||
349 | } | 370 | } |
350 | 371 | ||
351 | ulong regionHandle = Convert.ToUInt64((string)requestData["regionhandle"]); | ||
352 | |||
353 | m_log.InfoFormat("[LOGON]: User {0} {1} logged into region {2} as {3} agent, building indexes for user", | ||
354 | agentData.firstname, agentData.lastname, regionHandle, agentData.child ? "child" : "root"); | ||
355 | |||
356 | UserPresenceData up = new UserPresenceData(); | ||
357 | up.agentData = agentData; | ||
358 | up.friendData = GetUserFriendList(agentData.AgentID); | ||
359 | up.regionData = m_regionModule.GetRegionInfo(regionHandle); | ||
360 | up.OnlineYN = true; | ||
361 | up.lookupUserRegionYN = false; | ||
362 | ProcessFriendListSubscriptions(up); | ||
363 | |||
364 | return new XmlRpcResponse(); | 372 | return new XmlRpcResponse(); |
373 | |||
365 | } | 374 | } |
366 | 375 | ||
367 | /// <summary> | 376 | /// <summary> |
@@ -372,11 +381,18 @@ namespace OpenSim.Grid.MessagingServer.Modules | |||
372 | /// <returns></returns> | 381 | /// <returns></returns> |
373 | public XmlRpcResponse UserLoggedOff(XmlRpcRequest request, IPEndPoint remoteClient) | 382 | public XmlRpcResponse UserLoggedOff(XmlRpcRequest request, IPEndPoint remoteClient) |
374 | { | 383 | { |
375 | m_log.Info("[USERLOGOFF]: User logged off called"); | 384 | try |
376 | Hashtable requestData = (Hashtable)request.Params[0]; | 385 | { |
386 | m_log.Info("[USERLOGOFF]: User logged off called"); | ||
387 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
377 | 388 | ||
378 | UUID AgentID = new UUID((string)requestData["agentid"]); | 389 | UUID AgentID = new UUID((string)requestData["agentid"]); |
379 | ProcessLogOff(AgentID); | 390 | ProcessLogOff(AgentID); |
391 | } | ||
392 | catch (Exception e) | ||
393 | { | ||
394 | m_log.WarnFormat("[USERLOGOFF]: Exception on UserLoggedOff: {0}", e); | ||
395 | } | ||
380 | 396 | ||
381 | return new XmlRpcResponse(); | 397 | return new XmlRpcResponse(); |
382 | } | 398 | } |