diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 0ef327e..5fff777 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -18,20 +18,28 @@ namespace OpenSim.Region.Communications.OGS1 | |||
18 | public class OGS1GridServices : IGridServices, IInterRegionCommunications | 18 | public class OGS1GridServices : IGridServices, IInterRegionCommunications |
19 | { | 19 | { |
20 | public Dictionary<ulong, RegionCommsListener> listeners = new Dictionary<ulong, RegionCommsListener>(); | 20 | public Dictionary<ulong, RegionCommsListener> listeners = new Dictionary<ulong, RegionCommsListener>(); |
21 | public GridInfo grid; | ||
22 | public BaseHttpServer httpListener; | 21 | public BaseHttpServer httpListener; |
22 | public NetworkServersInfo serversInfo; | ||
23 | 23 | ||
24 | public RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo) | 24 | public OGS1GridServices(NetworkServersInfo servers_info) |
25 | { | ||
26 | serversInfo = servers_info; | ||
27 | } | ||
28 | |||
29 | public RegionCommsListener RegisterRegion(RegionInfo regionInfo) | ||
25 | { | 30 | { |
26 | Hashtable GridParams = new Hashtable(); | 31 | Hashtable GridParams = new Hashtable(); |
27 | 32 | ||
28 | grid = gridInfo; | ||
29 | 33 | ||
30 | // Login / Authentication | 34 | // Login / Authentication |
31 | GridParams["authkey"] = gridInfo.GridServerSendKey; | 35 | |
36 | GridParams["authkey"] = serversInfo.GridSendKey; | ||
32 | GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated(); | 37 | GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated(); |
33 | GridParams["sim_ip"] = regionInfo.InternalEndPoint.Address.ToString(); | 38 | GridParams["sim_ip"] = regionInfo.InternalEndPoint.Address.ToString(); |
34 | GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString(); | 39 | GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString(); |
40 | GridParams["region_locx"] = regionInfo.RegionLocX.ToString(); | ||
41 | GridParams["region_locy"] = regionInfo.RegionLocY.ToString(); | ||
42 | GridParams["sim_name"] = regionInfo.RegionName; | ||
35 | 43 | ||
36 | // Package into an XMLRPC Request | 44 | // Package into an XMLRPC Request |
37 | ArrayList SendParams = new ArrayList(); | 45 | ArrayList SendParams = new ArrayList(); |
@@ -41,7 +49,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
41 | 49 | ||
42 | // Send Request | 50 | // Send Request |
43 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); | 51 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); |
44 | XmlRpcResponse GridResp = GridReq.Send(gridInfo.GridServerURI, 3000); | 52 | XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000); |
45 | Hashtable GridRespData = (Hashtable)GridResp.Value; | 53 | Hashtable GridRespData = (Hashtable)GridResp.Value; |
46 | 54 | ||
47 | Hashtable griddatahash = GridRespData; | 55 | Hashtable griddatahash = GridRespData; |
@@ -149,7 +157,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
149 | IList parameters = new ArrayList(); | 157 | IList parameters = new ArrayList(); |
150 | parameters.Add(param); | 158 | parameters.Add(param); |
151 | XmlRpcRequest req = new XmlRpcRequest("map_block", parameters); | 159 | XmlRpcRequest req = new XmlRpcRequest("map_block", parameters); |
152 | XmlRpcResponse resp = req.Send(grid.GridServerURI, 3000); | 160 | XmlRpcResponse resp = req.Send(serversInfo.GridURL, 3000); |
153 | Hashtable respData = (Hashtable)resp.Value; | 161 | Hashtable respData = (Hashtable)resp.Value; |
154 | return respData; | 162 | return respData; |
155 | } | 163 | } |