public override bool DeregisterRegion(RegionInfo regionInfo) { bool success = m_localBackend.DeregisterRegion(regionInfo); if (!success) { success = base.DeregisterRegion(regionInfo); } return(success); }
// see IGridServices public bool DeregisterRegion(RegionInfo regionInfo) { Hashtable GridParams = new Hashtable(); GridParams["UUID"] = regionInfo.RegionID.ToString(); // Package into an XMLRPC Request ArrayList SendParams = new ArrayList(); SendParams.Add(GridParams); // Send Request string methodName = "simulator_after_region_moved"; XmlRpcRequest GridReq = new XmlRpcRequest(methodName, SendParams); XmlRpcResponse GridResp = null; try { GridResp = GridReq.Send(Util.XmlRpcRequestURI(serversInfo.GridURL, methodName), 10000); } catch (Exception e) { Exception e2 = new Exception( String.Format( "Unable to deregister region with grid at {0}. Grid service not running?", serversInfo.GridURL), e); throw e2; } Hashtable GridRespData = (Hashtable)GridResp.Value; // Hashtable griddatahash = GridRespData; // Process Response if (GridRespData != null && GridRespData.ContainsKey("error")) { string errorstring = (string)GridRespData["error"]; m_log.Error("Unable to connect to grid: " + errorstring); return(false); } return(m_localBackend.DeregisterRegion(regionInfo)); }