Sigh. Manual data typing grief.
parent
0318e824ae
commit
6957803759
|
@ -82,7 +82,7 @@ namespace OpenSim.Framework.Communications.Clients
|
|||
XmlRpcResponse reply;
|
||||
try
|
||||
{
|
||||
reply = request.Send(authurl, 6000);
|
||||
reply = request.Send(authurl, 10000);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -90,17 +90,25 @@ namespace OpenSim.Framework.Communications.Clients
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!reply.IsFault)
|
||||
if (reply != null)
|
||||
{
|
||||
bool success = false;
|
||||
if (reply.Value != null)
|
||||
success = (bool)reply.Value;
|
||||
if (!reply.IsFault)
|
||||
{
|
||||
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
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -490,7 +490,7 @@ namespace OpenSim.Framework.Communications.Services
|
|||
// This is the meaning of POST agent
|
||||
|
||||
// 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.");
|
||||
responsedata["int_response_code"] = 501;
|
||||
|
@ -499,6 +499,7 @@ namespace OpenSim.Framework.Communications.Services
|
|||
}
|
||||
|
||||
bool success = VerifyKey(userID, authToken);
|
||||
m_log.Debug("[HGStandaloneInvService]: Key verification returned " + success);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
|
|
@ -161,14 +161,6 @@ namespace OpenSim.Framework.Communications.Services
|
|||
|
||||
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;
|
||||
|
||||
if (request.Params.Count >= 2)
|
||||
|
@ -180,7 +172,7 @@ namespace OpenSim.Framework.Communications.Services
|
|||
{
|
||||
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))
|
||||
{
|
||||
|
@ -193,8 +185,9 @@ namespace OpenSim.Framework.Communications.Services
|
|||
}
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[HGLOGIN]: Response to VerifyKey is {0}", success);
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
response.Value = (string)success.ToString();
|
||||
response.Value = success;
|
||||
return response;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue