diff options
Diffstat (limited to 'OpenSim/Services/Connectors/Hypergrid')
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | 50 | ||||
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | 2 |
2 files changed, 33 insertions, 19 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs index 479a80e..70bafda 100644 --- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | |||
@@ -63,12 +63,12 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
63 | 63 | ||
64 | protected override string AgentPath() | 64 | protected override string AgentPath() |
65 | { | 65 | { |
66 | return "/foreignagent/"; | 66 | return "foreignagent/"; |
67 | } | 67 | } |
68 | 68 | ||
69 | protected override string ObjectPath() | 69 | protected override string ObjectPath() |
70 | { | 70 | { |
71 | return "/foreignobject/"; | 71 | return "foreignobject/"; |
72 | } | 72 | } |
73 | 73 | ||
74 | public bool LinkRegion(GridRegion info, out UUID regionID, out ulong realHandle, out string externalName, out string imageURL, out string reason) | 74 | public bool LinkRegion(GridRegion info, out UUID regionID, out ulong realHandle, out string externalName, out string imageURL, out string reason) |
@@ -86,12 +86,11 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
86 | paramList.Add(hash); | 86 | paramList.Add(hash); |
87 | 87 | ||
88 | XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); | 88 | XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); |
89 | string uri = "http://" + ((info.ServerURI != null && info.ServerURI != string.Empty && !info.ServerURI.StartsWith("http:")) ? info.ServerURI : info.ExternalEndPoint.Address + ":" + info.HttpPort + "/"); | 89 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + info.ServerURI); |
90 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri); | ||
91 | XmlRpcResponse response = null; | 90 | XmlRpcResponse response = null; |
92 | try | 91 | try |
93 | { | 92 | { |
94 | response = request.Send(uri, 10000); | 93 | response = request.Send(info.ServerURI, 10000); |
95 | } | 94 | } |
96 | catch (Exception e) | 95 | catch (Exception e) |
97 | { | 96 | { |
@@ -108,8 +107,8 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
108 | } | 107 | } |
109 | 108 | ||
110 | hash = (Hashtable)response.Value; | 109 | hash = (Hashtable)response.Value; |
111 | //foreach (Object o in hash) | 110 | foreach (Object o in hash) |
112 | // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); | 111 | m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); |
113 | try | 112 | try |
114 | { | 113 | { |
115 | bool success = false; | 114 | bool success = false; |
@@ -117,16 +116,20 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
117 | if (success) | 116 | if (success) |
118 | { | 117 | { |
119 | UUID.TryParse((string)hash["uuid"], out regionID); | 118 | UUID.TryParse((string)hash["uuid"], out regionID); |
120 | //m_log.Debug(">> HERE, uuid: " + uuid); | 119 | m_log.Debug(">> HERE, uuid: " + regionID); |
121 | if ((string)hash["handle"] != null) | 120 | if ((string)hash["handle"] != null) |
122 | { | 121 | { |
123 | realHandle = Convert.ToUInt64((string)hash["handle"]); | 122 | realHandle = Convert.ToUInt64((string)hash["handle"]); |
124 | //m_log.Debug(">> HERE, realHandle: " + realHandle); | 123 | m_log.Debug(">> HERE, realHandle: " + realHandle); |
125 | } | 124 | } |
126 | if (hash["region_image"] != null) | 125 | if (hash["region_image"] != null) { |
127 | imageURL = (string)hash["region_image"]; | 126 | imageURL = (string)hash["region_image"]; |
128 | if (hash["external_name"] != null) | 127 | m_log.Debug(">> HERE, imageURL: " + imageURL); |
128 | } | ||
129 | if (hash["external_name"] != null) { | ||
129 | externalName = (string)hash["external_name"]; | 130 | externalName = (string)hash["external_name"]; |
131 | m_log.Debug(">> HERE, externalName: " + externalName); | ||
132 | } | ||
130 | } | 133 | } |
131 | 134 | ||
132 | } | 135 | } |
@@ -188,12 +191,11 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
188 | paramList.Add(hash); | 191 | paramList.Add(hash); |
189 | 192 | ||
190 | XmlRpcRequest request = new XmlRpcRequest("get_region", paramList); | 193 | XmlRpcRequest request = new XmlRpcRequest("get_region", paramList); |
191 | string uri = "http://" + ((gatekeeper.ServerURI != null && gatekeeper.ServerURI != string.Empty && !gatekeeper.ServerURI.StartsWith("http:")) ? gatekeeper.ServerURI : gatekeeper.ExternalEndPoint.Address + ":" + gatekeeper.HttpPort + "/"); | 194 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + gatekeeper.ServerURI); |
192 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri); | ||
193 | XmlRpcResponse response = null; | 195 | XmlRpcResponse response = null; |
194 | try | 196 | try |
195 | { | 197 | { |
196 | response = request.Send(uri, 10000); | 198 | response = request.Send(gatekeeper.ServerURI, 10000); |
197 | } | 199 | } |
198 | catch (Exception e) | 200 | catch (Exception e) |
199 | { | 201 | { |
@@ -219,38 +221,48 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
219 | GridRegion region = new GridRegion(); | 221 | GridRegion region = new GridRegion(); |
220 | 222 | ||
221 | UUID.TryParse((string)hash["uuid"], out region.RegionID); | 223 | UUID.TryParse((string)hash["uuid"], out region.RegionID); |
222 | //m_log.Debug(">> HERE, uuid: " + region.RegionID); | 224 | m_log.Debug(">> HERE, uuid: " + region.RegionID); |
223 | int n = 0; | 225 | int n = 0; |
224 | if (hash["x"] != null) | 226 | if (hash["x"] != null) |
225 | { | 227 | { |
226 | Int32.TryParse((string)hash["x"], out n); | 228 | Int32.TryParse((string)hash["x"], out n); |
227 | region.RegionLocX = n; | 229 | region.RegionLocX = n; |
228 | //m_log.Debug(">> HERE, x: " + region.RegionLocX); | 230 | m_log.Debug(">> HERE, x: " + region.RegionLocX); |
229 | } | 231 | } |
230 | if (hash["y"] != null) | 232 | if (hash["y"] != null) |
231 | { | 233 | { |
232 | Int32.TryParse((string)hash["y"], out n); | 234 | Int32.TryParse((string)hash["y"], out n); |
233 | region.RegionLocY = n; | 235 | region.RegionLocY = n; |
234 | //m_log.Debug(">> HERE, y: " + region.RegionLocY); | 236 | m_log.Debug(">> HERE, y: " + region.RegionLocY); |
235 | } | 237 | } |
236 | if (hash["region_name"] != null) | 238 | if (hash["region_name"] != null) |
237 | { | 239 | { |
238 | region.RegionName = (string)hash["region_name"]; | 240 | region.RegionName = (string)hash["region_name"]; |
239 | //m_log.Debug(">> HERE, name: " + region.RegionName); | 241 | m_log.Debug(">> HERE, region_name: " + region.RegionName); |
240 | } | 242 | } |
241 | if (hash["hostname"] != null) | 243 | if (hash["hostname"] != null) { |
242 | region.ExternalHostName = (string)hash["hostname"]; | 244 | region.ExternalHostName = (string)hash["hostname"]; |
245 | m_log.Debug(">> HERE, hostname: " + region.ExternalHostName); | ||
246 | } | ||
243 | if (hash["http_port"] != null) | 247 | if (hash["http_port"] != null) |
244 | { | 248 | { |
245 | uint p = 0; | 249 | uint p = 0; |
246 | UInt32.TryParse((string)hash["http_port"], out p); | 250 | UInt32.TryParse((string)hash["http_port"], out p); |
247 | region.HttpPort = p; | 251 | region.HttpPort = p; |
252 | m_log.Debug(">> HERE, http_port: " + region.HttpPort); | ||
248 | } | 253 | } |
249 | if (hash["internal_port"] != null) | 254 | if (hash["internal_port"] != null) |
250 | { | 255 | { |
251 | int p = 0; | 256 | int p = 0; |
252 | Int32.TryParse((string)hash["internal_port"], out p); | 257 | Int32.TryParse((string)hash["internal_port"], out p); |
253 | region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p); | 258 | region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p); |
259 | m_log.Debug(">> HERE, internal_port: " + region.InternalEndPoint); | ||
260 | } | ||
261 | |||
262 | if (hash["server_uri"] != null) | ||
263 | { | ||
264 | region.ServerURI = (string) hash["server_uri"]; | ||
265 | m_log.Debug(">> HERE, server_uri: " + region.ServerURI); | ||
254 | } | 266 | } |
255 | 267 | ||
256 | // Successful return | 268 | // Successful return |
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 247dd7e..0c41935 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -232,12 +232,14 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
232 | m_log.Debug("[USER AGENT CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message); | 232 | m_log.Debug("[USER AGENT CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message); |
233 | } | 233 | } |
234 | // Add the input arguments | 234 | // Add the input arguments |
235 | args["gatekeeper_serveruri"] = OSD.FromString(gatekeeper.ServerURI); | ||
235 | args["gatekeeper_host"] = OSD.FromString(gatekeeper.ExternalHostName); | 236 | args["gatekeeper_host"] = OSD.FromString(gatekeeper.ExternalHostName); |
236 | args["gatekeeper_port"] = OSD.FromString(gatekeeper.HttpPort.ToString()); | 237 | args["gatekeeper_port"] = OSD.FromString(gatekeeper.HttpPort.ToString()); |
237 | args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); | 238 | args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); |
238 | args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); | 239 | args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); |
239 | args["destination_name"] = OSD.FromString(destination.RegionName); | 240 | args["destination_name"] = OSD.FromString(destination.RegionName); |
240 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); | 241 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); |
242 | args["destination_serveruri"] = OSD.FromString(destination.ServerURI); | ||
241 | 243 | ||
242 | // 10/3/2010 | 244 | // 10/3/2010 |
243 | // I added the client_ip up to the regular AgentCircuitData, so this doesn't need to be here. | 245 | // I added the client_ip up to the regular AgentCircuitData, so this doesn't need to be here. |