diff options
Diffstat (limited to 'OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs index 803cd1b..2340998 100644 --- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | |||
@@ -202,10 +202,16 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
202 | return mapTile; | 202 | return mapTile; |
203 | } | 203 | } |
204 | 204 | ||
205 | public GridRegion GetHyperlinkRegion(GridRegion gatekeeper, UUID regionID) | 205 | public GridRegion GetHyperlinkRegion(GridRegion gatekeeper, UUID regionID, UUID agentID, string agentHomeURI, out string message) |
206 | { | 206 | { |
207 | Hashtable hash = new Hashtable(); | 207 | Hashtable hash = new Hashtable(); |
208 | hash["region_uuid"] = regionID.ToString(); | 208 | hash["region_uuid"] = regionID.ToString(); |
209 | if (agentID != UUID.Zero) | ||
210 | { | ||
211 | hash["agent_id"] = agentID.ToString(); | ||
212 | if (agentHomeURI != null) | ||
213 | hash["agent_home_uri"] = agentHomeURI; | ||
214 | } | ||
209 | 215 | ||
210 | IList paramList = new ArrayList(); | 216 | IList paramList = new ArrayList(); |
211 | paramList.Add(hash); | 217 | paramList.Add(hash); |
@@ -219,12 +225,14 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
219 | } | 225 | } |
220 | catch (Exception e) | 226 | catch (Exception e) |
221 | { | 227 | { |
228 | message = "Error contacting grid."; | ||
222 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Exception " + e.Message); | 229 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Exception " + e.Message); |
223 | return null; | 230 | return null; |
224 | } | 231 | } |
225 | 232 | ||
226 | if (response.IsFault) | 233 | if (response.IsFault) |
227 | { | 234 | { |
235 | message = "Error contacting grid."; | ||
228 | m_log.ErrorFormat("[GATEKEEPER SERVICE CONNECTOR]: remote call returned an error: {0}", response.FaultString); | 236 | m_log.ErrorFormat("[GATEKEEPER SERVICE CONNECTOR]: remote call returned an error: {0}", response.FaultString); |
229 | return null; | 237 | return null; |
230 | } | 238 | } |
@@ -236,6 +244,14 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
236 | { | 244 | { |
237 | bool success = false; | 245 | bool success = false; |
238 | Boolean.TryParse((string)hash["result"], out success); | 246 | Boolean.TryParse((string)hash["result"], out success); |
247 | |||
248 | if (hash["message"] != null) | ||
249 | message = (string)hash["message"]; | ||
250 | else if (success) | ||
251 | message = null; | ||
252 | else | ||
253 | message = "The teleport destination could not be found."; // probably the dest grid is old and doesn't send 'message', but the most common problem is that the region is unavailable | ||
254 | |||
239 | if (success) | 255 | if (success) |
240 | { | 256 | { |
241 | GridRegion region = new GridRegion(); | 257 | GridRegion region = new GridRegion(); |
@@ -255,6 +271,18 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
255 | region.RegionLocY = n; | 271 | region.RegionLocY = n; |
256 | //m_log.Debug(">> HERE, y: " + region.RegionLocY); | 272 | //m_log.Debug(">> HERE, y: " + region.RegionLocY); |
257 | } | 273 | } |
274 | if (hash["size_x"] != null) | ||
275 | { | ||
276 | Int32.TryParse((string)hash["size_x"], out n); | ||
277 | region.RegionSizeX = n; | ||
278 | //m_log.Debug(">> HERE, x: " + region.RegionLocX); | ||
279 | } | ||
280 | if (hash["size_y"] != null) | ||
281 | { | ||
282 | Int32.TryParse((string)hash["size_y"], out n); | ||
283 | region.RegionSizeY = n; | ||
284 | //m_log.Debug(">> HERE, y: " + region.RegionLocY); | ||
285 | } | ||
258 | if (hash["region_name"] != null) | 286 | if (hash["region_name"] != null) |
259 | { | 287 | { |
260 | region.RegionName = (string)hash["region_name"]; | 288 | region.RegionName = (string)hash["region_name"]; |
@@ -293,6 +321,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
293 | } | 321 | } |
294 | catch (Exception e) | 322 | catch (Exception e) |
295 | { | 323 | { |
324 | message = "Error parsing response from grid."; | ||
296 | m_log.Error("[GATEKEEPER SERVICE CONNECTOR]: Got exception while parsing hyperlink response " + e.StackTrace); | 325 | m_log.Error("[GATEKEEPER SERVICE CONNECTOR]: Got exception while parsing hyperlink response " + e.StackTrace); |
297 | return null; | 326 | return null; |
298 | } | 327 | } |