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>
|
/// <returns></returns>
|
||||||
public XmlRpcResponse UserLoggedOn(XmlRpcRequest request, IPEndPoint remoteClient)
|
public XmlRpcResponse UserLoggedOn(XmlRpcRequest request, IPEndPoint remoteClient)
|
||||||
{
|
{
|
||||||
Hashtable requestData = (Hashtable)request.Params[0];
|
try
|
||||||
|
|
||||||
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;
|
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 =
|
m_log.WarnFormat("[LOGIN]: Exception on UserLoggedOn: {0}", e);
|
||||||
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);
|
|
||||||
|
|
||||||
return new XmlRpcResponse();
|
return new XmlRpcResponse();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -372,11 +381,18 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public XmlRpcResponse UserLoggedOff(XmlRpcRequest request, IPEndPoint remoteClient)
|
public XmlRpcResponse UserLoggedOff(XmlRpcRequest request, IPEndPoint remoteClient)
|
||||||
{
|
{
|
||||||
m_log.Info("[USERLOGOFF]: User logged off called");
|
try
|
||||||
Hashtable requestData = (Hashtable)request.Params[0];
|
{
|
||||||
|
m_log.Info("[USERLOGOFF]: User logged off called");
|
||||||
|
Hashtable requestData = (Hashtable)request.Params[0];
|
||||||
|
|
||||||
UUID AgentID = new UUID((string)requestData["agentid"]);
|
UUID AgentID = new UUID((string)requestData["agentid"]);
|
||||||
ProcessLogOff(AgentID);
|
ProcessLogOff(AgentID);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.WarnFormat("[USERLOGOFF]: Exception on UserLoggedOff: {0}", e);
|
||||||
|
}
|
||||||
|
|
||||||
return new XmlRpcResponse();
|
return new XmlRpcResponse();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue