From fe8d3d5a2bc0ddbc051d8a7ad2412da5f3546075 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 22 Oct 2010 23:52:07 +0100 Subject: Revert "Merge remote branch 'otakup0pe/mantis5110'" This reverts commit 21187f459ea2ae590dda4249fa15ebf116d04fe0, reversing changes made to 8f34e46d7449be1c29419a232a8f7f1e5918f03c. --- .../Hypergrid/GatekeeperServiceConnector.cs | 50 ++++++++-------------- .../Hypergrid/UserAgentServiceConnector.cs | 2 - 2 files changed, 19 insertions(+), 33 deletions(-) (limited to 'OpenSim/Services/Connectors/Hypergrid') diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs index 70bafda..479a80e 100644 --- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs @@ -63,12 +63,12 @@ namespace OpenSim.Services.Connectors.Hypergrid protected override string AgentPath() { - return "foreignagent/"; + return "/foreignagent/"; } protected override string ObjectPath() { - return "foreignobject/"; + return "/foreignobject/"; } public bool LinkRegion(GridRegion info, out UUID regionID, out ulong realHandle, out string externalName, out string imageURL, out string reason) @@ -86,11 +86,12 @@ namespace OpenSim.Services.Connectors.Hypergrid paramList.Add(hash); XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); - m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + info.ServerURI); + string uri = "http://" + ((info.ServerURI != null && info.ServerURI != string.Empty && !info.ServerURI.StartsWith("http:")) ? info.ServerURI : info.ExternalEndPoint.Address + ":" + info.HttpPort + "/"); + m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri); XmlRpcResponse response = null; try { - response = request.Send(info.ServerURI, 10000); + response = request.Send(uri, 10000); } catch (Exception e) { @@ -107,8 +108,8 @@ namespace OpenSim.Services.Connectors.Hypergrid } hash = (Hashtable)response.Value; - foreach (Object o in hash) - m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); + //foreach (Object o in hash) + // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); try { bool success = false; @@ -116,20 +117,16 @@ namespace OpenSim.Services.Connectors.Hypergrid if (success) { UUID.TryParse((string)hash["uuid"], out regionID); - m_log.Debug(">> HERE, uuid: " + regionID); + //m_log.Debug(">> HERE, uuid: " + uuid); if ((string)hash["handle"] != null) { realHandle = Convert.ToUInt64((string)hash["handle"]); - m_log.Debug(">> HERE, realHandle: " + realHandle); + //m_log.Debug(">> HERE, realHandle: " + realHandle); } - if (hash["region_image"] != null) { + if (hash["region_image"] != null) imageURL = (string)hash["region_image"]; - m_log.Debug(">> HERE, imageURL: " + imageURL); - } - if (hash["external_name"] != null) { + if (hash["external_name"] != null) externalName = (string)hash["external_name"]; - m_log.Debug(">> HERE, externalName: " + externalName); - } } } @@ -191,11 +188,12 @@ namespace OpenSim.Services.Connectors.Hypergrid paramList.Add(hash); XmlRpcRequest request = new XmlRpcRequest("get_region", paramList); - m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + gatekeeper.ServerURI); + string uri = "http://" + ((gatekeeper.ServerURI != null && gatekeeper.ServerURI != string.Empty && !gatekeeper.ServerURI.StartsWith("http:")) ? gatekeeper.ServerURI : gatekeeper.ExternalEndPoint.Address + ":" + gatekeeper.HttpPort + "/"); + m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri); XmlRpcResponse response = null; try { - response = request.Send(gatekeeper.ServerURI, 10000); + response = request.Send(uri, 10000); } catch (Exception e) { @@ -221,48 +219,38 @@ namespace OpenSim.Services.Connectors.Hypergrid GridRegion region = new GridRegion(); UUID.TryParse((string)hash["uuid"], out region.RegionID); - m_log.Debug(">> HERE, uuid: " + region.RegionID); + //m_log.Debug(">> HERE, uuid: " + region.RegionID); int n = 0; if (hash["x"] != null) { Int32.TryParse((string)hash["x"], out n); region.RegionLocX = n; - m_log.Debug(">> HERE, x: " + region.RegionLocX); + //m_log.Debug(">> HERE, x: " + region.RegionLocX); } if (hash["y"] != null) { Int32.TryParse((string)hash["y"], out n); region.RegionLocY = n; - m_log.Debug(">> HERE, y: " + region.RegionLocY); + //m_log.Debug(">> HERE, y: " + region.RegionLocY); } if (hash["region_name"] != null) { region.RegionName = (string)hash["region_name"]; - m_log.Debug(">> HERE, region_name: " + region.RegionName); + //m_log.Debug(">> HERE, name: " + region.RegionName); } - if (hash["hostname"] != null) { + if (hash["hostname"] != null) region.ExternalHostName = (string)hash["hostname"]; - m_log.Debug(">> HERE, hostname: " + region.ExternalHostName); - } if (hash["http_port"] != null) { uint p = 0; UInt32.TryParse((string)hash["http_port"], out p); region.HttpPort = p; - m_log.Debug(">> HERE, http_port: " + region.HttpPort); } if (hash["internal_port"] != null) { int p = 0; Int32.TryParse((string)hash["internal_port"], out p); region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p); - m_log.Debug(">> HERE, internal_port: " + region.InternalEndPoint); - } - - if (hash["server_uri"] != null) - { - region.ServerURI = (string) hash["server_uri"]; - m_log.Debug(">> HERE, server_uri: " + region.ServerURI); } // Successful return diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 0c41935..247dd7e 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs @@ -232,14 +232,12 @@ namespace OpenSim.Services.Connectors.Hypergrid m_log.Debug("[USER AGENT CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message); } // Add the input arguments - args["gatekeeper_serveruri"] = OSD.FromString(gatekeeper.ServerURI); args["gatekeeper_host"] = OSD.FromString(gatekeeper.ExternalHostName); args["gatekeeper_port"] = OSD.FromString(gatekeeper.HttpPort.ToString()); args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); args["destination_name"] = OSD.FromString(destination.RegionName); args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); - args["destination_serveruri"] = OSD.FromString(destination.ServerURI); // 10/3/2010 // I added the client_ip up to the regular AgentCircuitData, so this doesn't need to be here. -- cgit v1.1