Sigh. Manual data typing grief.

0.6.5-rc1
diva 2009-03-30 17:34:36 +00:00
parent 0318e824ae
commit 6957803759
3 changed files with 20 additions and 18 deletions

View File

@ -82,7 +82,7 @@ namespace OpenSim.Framework.Communications.Clients
XmlRpcResponse reply; XmlRpcResponse reply;
try try
{ {
reply = request.Send(authurl, 6000); reply = request.Send(authurl, 10000);
} }
catch (Exception e) catch (Exception e)
{ {
@ -90,17 +90,25 @@ namespace OpenSim.Framework.Communications.Clients
return false; return false;
} }
if (!reply.IsFault) if (reply != null)
{ {
bool success = false; if (!reply.IsFault)
if (reply.Value != null) {
success = (bool)reply.Value; bool success = false;
if (reply.Value != null)
success = (bool)reply.Value;
return success; return success;
}
else
{
System.Console.WriteLine("[HGrid]: XmlRpc request to verify key failed with message {0}" + reply.FaultString + ", code " + reply.FaultCode);
return false;
}
} }
else else
{ {
System.Console.WriteLine("[HGrid]: XmlRpc request to verify key failed with message {0}" + reply.FaultString + ", code " + reply.FaultCode); System.Console.WriteLine("[HGrid]: XmlRpc request to verify key returned null reply");
return false; return false;
} }
} }

View File

@ -490,7 +490,7 @@ namespace OpenSim.Framework.Communications.Services
// This is the meaning of POST agent // This is the meaning of POST agent
// Check Auth Token // Check Auth Token
if (!(m_userService is IAuthentication)) if ((m_userService != null) && !(m_userService is IAuthentication))
{ {
m_log.Debug("[HGStandaloneInvService]: UserService is not IAuthentication. Denying access to inventory."); m_log.Debug("[HGStandaloneInvService]: UserService is not IAuthentication. Denying access to inventory.");
responsedata["int_response_code"] = 501; responsedata["int_response_code"] = 501;
@ -499,6 +499,7 @@ namespace OpenSim.Framework.Communications.Services
} }
bool success = VerifyKey(userID, authToken); bool success = VerifyKey(userID, authToken);
m_log.Debug("[HGStandaloneInvService]: Key verification returned " + success);
if (success) if (success)
{ {

View File

@ -161,14 +161,6 @@ namespace OpenSim.Framework.Communications.Services
public XmlRpcResponse XmlRpcVerifyKeyMethod(XmlRpcRequest request) public XmlRpcResponse XmlRpcVerifyKeyMethod(XmlRpcRequest request)
{ {
foreach (object o in request.Params)
{
if (o != null)
m_log.Debug(" >> Param " + o.ToString());
else
m_log.Debug(" >> Null");
}
bool success = false; bool success = false;
if (request.Params.Count >= 2) if (request.Params.Count >= 2)
@ -180,7 +172,7 @@ namespace OpenSim.Framework.Communications.Services
{ {
authKey = (string)request.Params[1]; authKey = (string)request.Params[1];
m_log.InfoFormat("[HGLOGIN] HGVerifyKey called with key ", authKey); m_log.InfoFormat("[HGLOGIN] HGVerifyKey called with key {0}", authKey);
if (!(m_userManager is IAuthentication)) if (!(m_userManager is IAuthentication))
{ {
@ -193,8 +185,9 @@ namespace OpenSim.Framework.Communications.Services
} }
} }
m_log.DebugFormat("[HGLOGIN]: Response to VerifyKey is {0}", success);
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
response.Value = (string)success.ToString(); response.Value = success;
return response; return response;
} }