aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-08-25 21:26:58 +0000
committerJustin Clarke Casey2008-08-25 21:26:58 +0000
commit7402c2d288045fc817c2da8ae6b336253a57b290 (patch)
treedb52a8cc35d3da5c4d41f0e2fa5d2f128a416935
parentAdd the same delay factor in the XEngine section for the XEngine (diff)
downloadopensim-SC-7402c2d288045fc817c2da8ae6b336253a57b290.zip
opensim-SC-7402c2d288045fc817c2da8ae6b336253a57b290.tar.gz
opensim-SC-7402c2d288045fc817c2da8ae6b336253a57b290.tar.bz2
opensim-SC-7402c2d288045fc817c2da8ae6b336253a57b290.tar.xz
* Deal with a WebException thrown if a grid server cannot be contacted for region information
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs2
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs29
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
3 files changed, 26 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 8214045..a30cafd 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -1355,7 +1355,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1355 } 1355 }
1356 1356
1357 /// <summary> 1357 /// <summary>
1358 /// 1358 /// Inform the client that a teleport attempt has failed
1359 /// </summary> 1359 /// </summary>
1360 public void SendTeleportFailed(string reason) 1360 public void SendTeleportFailed(string reason)
1361 { 1361 {
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index 7baaa16..4346ecb 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -282,10 +282,14 @@ namespace OpenSim.Region.Communications.OGS1
282 } 282 }
283 283
284 /// <summary> 284 /// <summary>
285 /// 285 /// Request information about a region.
286 /// </summary> 286 /// </summary>
287 /// <param name="regionHandle"></param> 287 /// <param name="regionHandle"></param>
288 /// <returns></returns> 288 /// <returns>
289 /// null on a failure to contact or get a response from the grid server
290 /// FIXME: Might be nicer to return a proper exception here since we could inform the client more about the
291 /// nature of the faiulre.
292 /// </returns>
289 public RegionInfo RequestNeighbourInfo(LLUUID Region_UUID) 293 public RegionInfo RequestNeighbourInfo(LLUUID Region_UUID)
290 { 294 {
291 RegionInfo regionInfo; 295 RegionInfo regionInfo;
@@ -294,10 +298,23 @@ namespace OpenSim.Region.Communications.OGS1
294 requestData["authkey"] = serversInfo.GridSendKey; 298 requestData["authkey"] = serversInfo.GridSendKey;
295 ArrayList SendParams = new ArrayList(); 299 ArrayList SendParams = new ArrayList();
296 SendParams.Add(requestData); 300 SendParams.Add(requestData);
297 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); 301 XmlRpcRequest gridReq = new XmlRpcRequest("simulator_data_request", SendParams);
298 XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000); 302 XmlRpcResponse gridResp = null;
303
304 try
305 {
306 gridResp = gridReq.Send(serversInfo.GridURL, 3000);
307 }
308 catch (WebException e)
309 {
310 m_log.ErrorFormat(
311 "[OGS1 GRID SERVICES]: Communication with the grid server at {0} failed, {1}",
312 serversInfo.GridURL, e);
313
314 return null;
315 }
299 316
300 Hashtable responseData = (Hashtable) GridResp.Value; 317 Hashtable responseData = (Hashtable)gridResp.Value;
301 318
302 if (responseData.ContainsKey("error")) 319 if (responseData.ContainsKey("error"))
303 { 320 {
@@ -335,7 +352,7 @@ namespace OpenSim.Region.Communications.OGS1
335 } 352 }
336 353
337 /// <summary> 354 /// <summary>
338 /// 355 /// Request information about a region.
339 /// </summary> 356 /// </summary>
340 /// <param name="regionHandle"></param> 357 /// <param name="regionHandle"></param>
341 /// <returns></returns> 358 /// <returns></returns>
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 6f3267a..9b91176 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2897,12 +2897,14 @@ namespace OpenSim.Region.Environment.Scenes
2897 public void RequestTeleportLandmark(IClientAPI remoteClient, LLUUID regionID, LLVector3 position) 2897 public void RequestTeleportLandmark(IClientAPI remoteClient, LLUUID regionID, LLVector3 position)
2898 { 2898 {
2899 RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(regionID); 2899 RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(regionID);
2900
2900 if (info == null) 2901 if (info == null)
2901 { 2902 {
2902 // can't find the region: Tell viewer and abort 2903 // can't find the region: Tell viewer and abort
2903 remoteClient.SendTeleportFailed("The teleport destination could not be found."); 2904 remoteClient.SendTeleportFailed("The teleport destination could not be found.");
2904 return; 2905 return;
2905 } 2906 }
2907
2906 lock (m_scenePresences) 2908 lock (m_scenePresences)
2907 { 2909 {
2908 if (m_scenePresences.ContainsKey(remoteClient.AgentId)) 2910 if (m_scenePresences.ContainsKey(remoteClient.AgentId))