From 695780375924693105aa9b5a06bfe81a28393373 Mon Sep 17 00:00:00 2001 From: diva Date: Mon, 30 Mar 2009 17:34:36 +0000 Subject: Sigh. Manual data typing grief. --- .../Framework/Communications/Clients/AuthClient.cs | 22 +++++++++++++++------- .../Communications/Services/HGInventoryService.cs | 3 ++- .../Communications/Services/HGLoginAuthService.cs | 13 +++---------- 3 files changed, 20 insertions(+), 18 deletions(-) (limited to 'OpenSim/Framework/Communications') diff --git a/OpenSim/Framework/Communications/Clients/AuthClient.cs b/OpenSim/Framework/Communications/Clients/AuthClient.cs index 95af7e1..ba5cf66 100644 --- a/OpenSim/Framework/Communications/Clients/AuthClient.cs +++ b/OpenSim/Framework/Communications/Clients/AuthClient.cs @@ -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; } } diff --git a/OpenSim/Framework/Communications/Services/HGInventoryService.cs b/OpenSim/Framework/Communications/Services/HGInventoryService.cs index eef9e80..b01c30e 100644 --- a/OpenSim/Framework/Communications/Services/HGInventoryService.cs +++ b/OpenSim/Framework/Communications/Services/HGInventoryService.cs @@ -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) { diff --git a/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs b/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs index cd4ca5c..72e2dfb 100644 --- a/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs +++ b/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs @@ -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; } -- cgit v1.1