Better error handling to diagnose login problems.
parent
25e7697987
commit
b2cdee5a14
|
@ -182,19 +182,34 @@ namespace OpenSim.Client.Linden
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public XmlRpcResponse ExpectUser(XmlRpcRequest request, IPEndPoint remoteClient)
|
public XmlRpcResponse ExpectUser(XmlRpcRequest request, IPEndPoint remoteClient)
|
||||||
{
|
{
|
||||||
|
XmlRpcResponse resp = new XmlRpcResponse();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ulong regionHandle = 0;
|
||||||
Hashtable requestData = (Hashtable)request.Params[0];
|
Hashtable requestData = (Hashtable)request.Params[0];
|
||||||
AgentCircuitData agentData = new AgentCircuitData();
|
AgentCircuitData agentData = new AgentCircuitData();
|
||||||
|
if (requestData.ContainsKey("session_id"))
|
||||||
agentData.SessionID = new UUID((string)requestData["session_id"]);
|
agentData.SessionID = new UUID((string)requestData["session_id"]);
|
||||||
|
if (requestData.ContainsKey("secure_session_id"))
|
||||||
agentData.SecureSessionID = new UUID((string)requestData["secure_session_id"]);
|
agentData.SecureSessionID = new UUID((string)requestData["secure_session_id"]);
|
||||||
|
if (requestData.ContainsKey("firstname"))
|
||||||
agentData.firstname = (string)requestData["firstname"];
|
agentData.firstname = (string)requestData["firstname"];
|
||||||
|
if (requestData.ContainsKey("lastname"))
|
||||||
agentData.lastname = (string)requestData["lastname"];
|
agentData.lastname = (string)requestData["lastname"];
|
||||||
|
if (requestData.ContainsKey("agent_id"))
|
||||||
agentData.AgentID = new UUID((string)requestData["agent_id"]);
|
agentData.AgentID = new UUID((string)requestData["agent_id"]);
|
||||||
|
if (requestData.ContainsKey("circuit_code"))
|
||||||
agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]);
|
agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]);
|
||||||
|
if (requestData.ContainsKey("caps_path"))
|
||||||
agentData.CapsPath = (string)requestData["caps_path"];
|
agentData.CapsPath = (string)requestData["caps_path"];
|
||||||
ulong regionHandle = Convert.ToUInt64((string)requestData["regionhandle"]);
|
if (requestData.ContainsKey("regionhandle"))
|
||||||
|
regionHandle = Convert.ToUInt64((string)requestData["regionhandle"]);
|
||||||
|
else
|
||||||
|
m_log.Warn("[CLIENT]: request from login server did not contain regionhandle");
|
||||||
|
|
||||||
// Appearance
|
// Appearance
|
||||||
if (requestData["appearance"] != null)
|
if (requestData.ContainsKey("appearance"))
|
||||||
agentData.Appearance = new AvatarAppearance((Hashtable)requestData["appearance"]);
|
agentData.Appearance = new AvatarAppearance((Hashtable)requestData["appearance"]);
|
||||||
|
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
|
@ -216,8 +231,6 @@ namespace OpenSim.Client.Linden
|
||||||
agentData.child = false;
|
agentData.child = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
XmlRpcResponse resp = new XmlRpcResponse();
|
|
||||||
|
|
||||||
if (!RegionLoginsEnabled)
|
if (!RegionLoginsEnabled)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat(
|
m_log.InfoFormat(
|
||||||
|
@ -280,6 +293,15 @@ namespace OpenSim.Client.Linden
|
||||||
resp.Value = respdata;
|
resp.Value = respdata;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.WarnFormat("[CLIENT]: Unable to receive user. Reason: {0}", e);
|
||||||
|
Hashtable respdata = new Hashtable();
|
||||||
|
respdata["success"] = "FALSE";
|
||||||
|
respdata["reason"] = "Exception occurred";
|
||||||
|
resp.Value = respdata;
|
||||||
|
}
|
||||||
|
|
||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
|
|
|
@ -317,6 +317,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[LOGIN]: Appearance not for {0} {1}. Creating default.", user.FirstName, user.SurName);
|
m_log.DebugFormat("[LOGIN]: Appearance not for {0} {1}. Creating default.", user.FirstName, user.SurName);
|
||||||
appearance = new AvatarAppearance(user.ID);
|
appearance = new AvatarAppearance(user.ID);
|
||||||
|
loginParams["appearance"] = appearance.ToHashTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList SendParams = new ArrayList();
|
ArrayList SendParams = new ArrayList();
|
||||||
|
|
Loading…
Reference in New Issue