From 53793db182207b384bedab6094f879e9a8ad92d6 Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sat, 5 Jan 2008 15:10:22 +0000 Subject: Added errorhandler+tip that grid server might not be running on grid registration failure on opensim startup. --- OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Communications') diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 8d52eeb..2b324f8 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -113,10 +113,18 @@ namespace OpenSim.Region.Communications.OGS1 SendParams.Add(GridParams); // Send Request - XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); - XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 10000); - Hashtable GridRespData = (Hashtable) GridResp.Value; - + XmlRpcRequest GridReq; + XmlRpcResponse GridResp; + try + { + GridReq = new XmlRpcRequest("simulator_login", SendParams); + GridResp = GridReq.Send(serversInfo.GridURL, 10000); + } catch (Exception ex) + { + MainLog.Instance.Error("Unable to connect to grid (Grid server not running?): " + ex.ToString()); + return null; + } + Hashtable GridRespData = (Hashtable)GridResp.Value; Hashtable griddatahash = GridRespData; // Process Response -- cgit v1.1