From 6b0553ed7c15d242567e45779bc97f655ffab6de Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 15 Nov 2011 20:37:49 +0000 Subject: [PATCH] Dont' bother with a userAgentService != null check right after we've constructed it --- .../HypergridService/GatekeeperService.cs | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 9385b8df74..e26383f0ff 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -335,22 +335,21 @@ namespace OpenSim.Services.HypergridService } if (userURL == m_ExternalName) + { return m_UserAgentService.VerifyAgent(aCircuit.SessionID, aCircuit.ServiceSessionID); + } else { -// Object[] args = new Object[] { userURL }; IUserAgentService userAgentService = new UserAgentServiceConnector(userURL); - if (userAgentService != null) + + try { - try - { - return userAgentService.VerifyAgent(aCircuit.SessionID, aCircuit.ServiceSessionID); - } - catch - { - m_log.DebugFormat("[GATEKEEPER SERVICE]: Unable to contact authentication service at {0}", userURL); - return false; - } + return userAgentService.VerifyAgent(aCircuit.SessionID, aCircuit.ServiceSessionID); + } + catch + { + m_log.DebugFormat("[GATEKEEPER SERVICE]: Unable to contact authentication service at {0}", userURL); + return false; } }