Catch and print exceptions in MessagingService, to diagnose mysterious disappearances of the Messaging server.
parent
133a4a9906
commit
94783e9377
|
@ -324,44 +324,53 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
/// <returns></returns>
|
||||
public XmlRpcResponse UserLoggedOn(XmlRpcRequest request, IPEndPoint remoteClient)
|
||||
{
|
||||
Hashtable requestData = (Hashtable)request.Params[0];
|
||||
|
||||
AgentCircuitData agentData = new AgentCircuitData();
|
||||
agentData.SessionID = new UUID((string)requestData["sessionid"]);
|
||||
agentData.SecureSessionID = new UUID((string)requestData["secure_session_id"]);
|
||||
agentData.firstname = (string)requestData["firstname"];
|
||||
agentData.lastname = (string)requestData["lastname"];
|
||||
agentData.AgentID = new UUID((string)requestData["agentid"]);
|
||||
agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]);
|
||||
agentData.CapsPath = (string)requestData["caps_path"];
|
||||
|
||||
if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1"))
|
||||
try
|
||||
{
|
||||
agentData.child = true;
|
||||
Hashtable requestData = (Hashtable)request.Params[0];
|
||||
|
||||
AgentCircuitData agentData = new AgentCircuitData();
|
||||
agentData.SessionID = new UUID((string)requestData["sessionid"]);
|
||||
agentData.SecureSessionID = new UUID((string)requestData["secure_session_id"]);
|
||||
agentData.firstname = (string)requestData["firstname"];
|
||||
agentData.lastname = (string)requestData["lastname"];
|
||||
agentData.AgentID = new UUID((string)requestData["agentid"]);
|
||||
agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]);
|
||||
agentData.CapsPath = (string)requestData["caps_path"];
|
||||
|
||||
if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1"))
|
||||
{
|
||||
agentData.child = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
agentData.startpos =
|
||||
new Vector3(Convert.ToSingle(requestData["positionx"]),
|
||||
Convert.ToSingle(requestData["positiony"]),
|
||||
Convert.ToSingle(requestData["positionz"]));
|
||||
agentData.child = false;
|
||||
}
|
||||
|
||||
ulong regionHandle = Convert.ToUInt64((string)requestData["regionhandle"]);
|
||||
|
||||
m_log.InfoFormat("[LOGON]: User {0} {1} logged into region {2} as {3} agent, building indexes for user",
|
||||
agentData.firstname, agentData.lastname, regionHandle, agentData.child ? "child" : "root");
|
||||
|
||||
UserPresenceData up = new UserPresenceData();
|
||||
up.agentData = agentData;
|
||||
up.friendData = GetUserFriendList(agentData.AgentID);
|
||||
up.regionData = m_regionModule.GetRegionInfo(regionHandle);
|
||||
up.OnlineYN = true;
|
||||
up.lookupUserRegionYN = false;
|
||||
ProcessFriendListSubscriptions(up);
|
||||
|
||||
}
|
||||
else
|
||||
catch (Exception e)
|
||||
{
|
||||
agentData.startpos =
|
||||
new Vector3(Convert.ToSingle(requestData["positionx"]),
|
||||
Convert.ToSingle(requestData["positiony"]),
|
||||
Convert.ToSingle(requestData["positionz"]));
|
||||
agentData.child = false;
|
||||
m_log.WarnFormat("[LOGIN]: Exception on UserLoggedOn: {0}", e);
|
||||
}
|
||||
|
||||
ulong regionHandle = Convert.ToUInt64((string)requestData["regionhandle"]);
|
||||
|
||||
m_log.InfoFormat("[LOGON]: User {0} {1} logged into region {2} as {3} agent, building indexes for user",
|
||||
agentData.firstname, agentData.lastname, regionHandle, agentData.child ? "child" : "root");
|
||||
|
||||
UserPresenceData up = new UserPresenceData();
|
||||
up.agentData = agentData;
|
||||
up.friendData = GetUserFriendList(agentData.AgentID);
|
||||
up.regionData = m_regionModule.GetRegionInfo(regionHandle);
|
||||
up.OnlineYN = true;
|
||||
up.lookupUserRegionYN = false;
|
||||
ProcessFriendListSubscriptions(up);
|
||||
|
||||
return new XmlRpcResponse();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -372,11 +381,18 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
/// <returns></returns>
|
||||
public XmlRpcResponse UserLoggedOff(XmlRpcRequest request, IPEndPoint remoteClient)
|
||||
{
|
||||
m_log.Info("[USERLOGOFF]: User logged off called");
|
||||
Hashtable requestData = (Hashtable)request.Params[0];
|
||||
try
|
||||
{
|
||||
m_log.Info("[USERLOGOFF]: User logged off called");
|
||||
Hashtable requestData = (Hashtable)request.Params[0];
|
||||
|
||||
UUID AgentID = new UUID((string)requestData["agentid"]);
|
||||
ProcessLogOff(AgentID);
|
||||
UUID AgentID = new UUID((string)requestData["agentid"]);
|
||||
ProcessLogOff(AgentID);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.WarnFormat("[USERLOGOFF]: Exception on UserLoggedOff: {0}", e);
|
||||
}
|
||||
|
||||
return new XmlRpcResponse();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue