aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/OGS1
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 /OpenSim/Region/Communications/OGS1
parentAdd the same delay factor in the XEngine section for the XEngine (diff)
downloadopensim-SC_OLD-7402c2d288045fc817c2da8ae6b336253a57b290.zip
opensim-SC_OLD-7402c2d288045fc817c2da8ae6b336253a57b290.tar.gz
opensim-SC_OLD-7402c2d288045fc817c2da8ae6b336253a57b290.tar.bz2
opensim-SC_OLD-7402c2d288045fc817c2da8ae6b336253a57b290.tar.xz
* Deal with a WebException thrown if a grid server cannot be contacted for region information
Diffstat (limited to 'OpenSim/Region/Communications/OGS1')
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs29
1 files changed, 23 insertions, 6 deletions
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>