From ee068dd24361058f8fecb6568cc889e25ecea9b0 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 3 Aug 2010 16:27:11 -0700 Subject: One more thing related to the previous commit. Must avoid all in-process remote calls. --- .../Services/HypergridService/GatekeeperService.cs | 25 +++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 3fc9327..82543ab 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -283,18 +283,23 @@ namespace OpenSim.Services.HypergridService return false; } - Object[] args = new Object[] { userURL }; - IUserAgentService userAgentService = new UserAgentServiceConnector(userURL); //ServerUtils.LoadPlugin(m_AuthDll, args); - if (userAgentService != null) + if (userURL == m_ExternalName) + m_UserAgentService.VerifyAgent(aCircuit.SecureSessionID, aCircuit.ServiceSessionID); + else { - try + Object[] args = new Object[] { userURL }; + IUserAgentService userAgentService = new UserAgentServiceConnector(userURL); + if (userAgentService != null) { - return userAgentService.VerifyAgent(aCircuit.SessionID, aCircuit.ServiceSessionID); - } - catch - { - m_log.DebugFormat("[GATEKEEPER SERVICE]: Unable to contact authentication service at {0}", userURL); - return false; + try + { + return userAgentService.VerifyAgent(aCircuit.SessionID, aCircuit.ServiceSessionID); + } + catch + { + m_log.DebugFormat("[GATEKEEPER SERVICE]: Unable to contact authentication service at {0}", userURL); + return false; + } } } -- cgit v1.1 From 87046652b18800a80c6525e81798cf117232c02b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 3 Aug 2010 16:33:56 -0700 Subject: One more buglet related to the issue at hand. --- OpenSim/Services/HypergridService/GatekeeperService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 82543ab..95efdde 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -73,7 +73,7 @@ namespace OpenSim.Services.HypergridService throw new Exception(String.Format("No section GatekeeperService in config file")); string accountService = serverConfig.GetString("UserAccountService", String.Empty); - string homeUsersService = serverConfig.GetString("HomeUsersSecurityService", string.Empty); + string homeUsersService = serverConfig.GetString("UserAgentService", string.Empty); string gridService = serverConfig.GetString("GridService", String.Empty); string presenceService = serverConfig.GetString("PresenceService", String.Empty); string simulationService = serverConfig.GetString("SimulationService", String.Empty); -- cgit v1.1 From dd688a599489bda40d99cdfd23e7c8f3d103715b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 3 Aug 2010 16:59:34 -0700 Subject: sigh. fried brain. --- OpenSim/Services/HypergridService/GatekeeperService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 95efdde..47eb96a 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -284,7 +284,7 @@ namespace OpenSim.Services.HypergridService } if (userURL == m_ExternalName) - m_UserAgentService.VerifyAgent(aCircuit.SecureSessionID, aCircuit.ServiceSessionID); + m_UserAgentService.VerifyAgent(aCircuit.SessionID, aCircuit.ServiceSessionID); else { Object[] args = new Object[] { userURL }; -- cgit v1.1 From dd0ebbfb1f0bd4819255fd0f769e4a2a6c1f4891 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 3 Aug 2010 17:05:48 -0700 Subject: this is so bad, brain is beyond fried. must stop. --- OpenSim/Services/HypergridService/GatekeeperService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 47eb96a..3aaafe8 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -284,7 +284,7 @@ namespace OpenSim.Services.HypergridService } if (userURL == m_ExternalName) - m_UserAgentService.VerifyAgent(aCircuit.SessionID, aCircuit.ServiceSessionID); + return m_UserAgentService.VerifyAgent(aCircuit.SessionID, aCircuit.ServiceSessionID); else { Object[] args = new Object[] { userURL }; -- cgit v1.1 From 3c5983d8bd1f51c274a6d8e9e70499c11b365e09 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 3 Aug 2010 17:29:17 -0700 Subject: Another bug fixed. Same issue. --- OpenSim/Services/HypergridService/UserAgentService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 4bee4b5..ffb026b 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -179,7 +179,7 @@ namespace OpenSim.Services.HypergridService m_TravelingAgents[agentCircuit.SessionID] = travel; } travel.UserID = agentCircuit.AgentID; - travel.GridExternalName = region.ExternalHostName + ":" + region.HttpPort; + travel.GridExternalName = "http://" + region.ExternalHostName + ":" + region.HttpPort; travel.ServiceToken = agentCircuit.ServiceSessionID; if (old != null) travel.ClientToken = old.ClientToken; @@ -215,6 +215,7 @@ namespace OpenSim.Services.HypergridService return false; TravelingAgentInfo travel = m_TravelingAgents[sessionID]; + return travel.GridExternalName == thisGridExternalName; } -- cgit v1.1 From 53fb799778388e10be357fd78e757c228828aeaf Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 3 Aug 2010 18:18:01 -0700 Subject: Further bug fixing, still related to the issue earlier. --- .../Services/HypergridService/UserAgentService.cs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index ffb026b..181d7f2 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -61,9 +61,11 @@ namespace OpenSim.Services.HypergridService protected static IGridUserService m_GridUserService; protected static IGridService m_GridService; - //protected static GatekeeperServiceConnector m_GatekeeperConnector; + protected static GatekeeperServiceConnector m_GatekeeperConnector; protected static IGatekeeperService m_GatekeeperService; + protected static string m_GridName; + protected static bool m_BypassClientVerification; public UserAgentService(IConfigSource config) @@ -90,8 +92,15 @@ namespace OpenSim.Services.HypergridService Object[] args = new Object[] { config }; m_GridService = ServerUtils.LoadPlugin(gridService, args); m_GridUserService = ServerUtils.LoadPlugin(gridUserService, args); - //m_GatekeeperConnector = new GatekeeperServiceConnector(); + m_GatekeeperConnector = new GatekeeperServiceConnector(); m_GatekeeperService = ServerUtils.LoadPlugin(gatekeeperService, args); + + m_GridName = serverConfig.GetString("ExternalName", string.Empty); + if (m_GridName == string.Empty) + { + serverConfig = config.Configs["GatekeeperService"]; + m_GridName = serverConfig.GetString("ExternalName", string.Empty); + } } } @@ -139,7 +148,12 @@ namespace OpenSim.Services.HypergridService TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region); //bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason); - bool success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); + bool success = false; + string gridName = "http://" + gatekeeper.ExternalHostName + ":" + gatekeeper.HttpPort; + if (m_GridName == gridName) + success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); + else + success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason); if (!success) { -- cgit v1.1 From a1d7911feb33a4eccac6fca7603085c18098d473 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 4 Aug 2010 11:18:33 -0700 Subject: Better debug messages --- .../Hypergrid/UserAgentServiceConnector.cs | 24 +++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 42eca05..96d2605 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs @@ -358,7 +358,7 @@ namespace OpenSim.Services.Connectors.Hypergrid private bool GetBoolResponse(XmlRpcRequest request, out string reason) { - //m_log.Debug("[HGrid]: Linking to " + uri); + //m_log.Debug("[USER AGENT CONNECTOR]: GetBoolResponse from/to " + m_ServerURL); XmlRpcResponse response = null; try { @@ -366,14 +366,14 @@ namespace OpenSim.Services.Connectors.Hypergrid } catch (Exception e) { - m_log.Debug("[USER AGENT CONNECTOR]: Unable to contact remote server "); + m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0}", m_ServerURL); reason = "Exception: " + e.Message; return false; } if (response.IsFault) { - m_log.ErrorFormat("[HGrid]: remote call returned an error: {0}", response.FaultString); + m_log.ErrorFormat("[HGrid]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString); reason = "XMLRPC Fault"; return false; } @@ -383,15 +383,29 @@ namespace OpenSim.Services.Connectors.Hypergrid // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); try { + if (hash == null) + { + m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got null response from {0}! THIS IS BAAAAD", m_ServerURL); + reason = "Internal error 1"; + return false; + } bool success = false; reason = string.Empty; - Boolean.TryParse((string)hash["result"], out success); + if (hash.ContainsKey("result")) + Boolean.TryParse((string)hash["result"], out success); + else + { + reason = "Internal error 2"; + m_log.WarnFormat("[USER AGENT CONNECTOR]: response from {0} does not have expected key 'result'", m_ServerURL); + } return success; } catch (Exception e) { - m_log.Error("[HGrid]: Got exception while parsing GetEndPoint response " + e.StackTrace); + m_log.ErrorFormat("[HGrid]: Got exception on GetBoolResponse response."); + if (hash.ContainsKey("result") && hash["result"] != null) + m_log.ErrorFormat("Reply was ", (string)hash["result"]); reason = "Exception: " + e.Message; return false; } -- cgit v1.1 From f809797d62a8d3862459fb7398e2ec870cafdcf5 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 6 Aug 2010 15:18:48 +0200 Subject: Allow the trash folder itself to be passed to PurgeFolder --- OpenSim/Services/InventoryService/XInventoryService.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index f581f76..f63ab16 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs @@ -542,6 +542,9 @@ namespace OpenSim.Services.InventoryService if (folder.Length < 1) return false; + if (folder[0].type == (int)AssetType.TrashFolder) + return true; + UUID parentFolder = folder[0].parentFolderID; while (parentFolder != UUID.Zero) -- cgit v1.1