From 279e0061c515ee0a03036bef68eea9738273d785 Mon Sep 17 00:00:00 2001 From: Johan Berntsson Date: Tue, 4 Mar 2008 05:31:54 +0000 Subject: Merged 3Di code that provides scene and avatar serialization, and plugin support for region move/split/merge. See ThirdParty/3Di/README.txt. Unless the new modules are used there should be no noticeable changes when running OpenSim. --- .../Region/Communications/OGS1/OGS1GridServices.cs | 28 ++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Communications/OGS1') diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 12c91ac..cdafad3 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -111,6 +111,8 @@ namespace OpenSim.Region.Communications.OGS1 GridParams["http_port"] = serversInfo.HttpListenerPort.ToString(); GridParams["remoting_port"] = NetworkServersInfo.RemotingListenerPort.ToString(); GridParams["map-image-id"] = regionInfo.EstateSettings.terrainImageID.ToString(); + GridParams["originUUID"] = regionInfo.originRegionID.ToString(); + GridParams["server_uri"] = regionInfo.ServerURI; // part of an initial brutish effort to provide accurate information (as per the xml region spec) // wrt the ownership of a given region @@ -165,7 +167,30 @@ namespace OpenSim.Region.Communications.OGS1 public bool DeregisterRegion(RegionInfo regionInfo) { - return false; + Hashtable GridParams = new Hashtable(); + + GridParams["UUID"] = regionInfo.RegionID.ToString(); + + // Package into an XMLRPC Request + ArrayList SendParams = new ArrayList(); + SendParams.Add(GridParams); + + // Send Request + XmlRpcRequest GridReq = new XmlRpcRequest("simulator_after_region_moved", SendParams); + XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 10000); + Hashtable GridRespData = (Hashtable) GridResp.Value; + + Hashtable griddatahash = GridRespData; + + // Process Response + if (GridRespData.ContainsKey("error")) { + string errorstring = (string)GridRespData["error"]; + m_log.Error("Unable to connect to grid: " + errorstring); + return false; + } + + // What does DeregisterRegion() do? + return m_localBackend.DeregisterRegion(regionInfo); } public virtual Dictionary GetGridSettings() @@ -1209,7 +1234,6 @@ namespace OpenSim.Region.Communications.OGS1 } return m_localBackend.TriggerRegionUp(new RegionInfo(regionData), regionhandle); - } catch (RemotingException e) -- cgit v1.1