aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/OGS1
diff options
context:
space:
mode:
authormingchen2007-07-03 17:03:14 +0000
committermingchen2007-07-03 17:03:14 +0000
commite06ffb3981d29ddb3383690b4a05dc684813b6d9 (patch)
tree5f8fcfe04d949007462689572988dfcc687d5ceb /OpenSim/Region/Communications/OGS1
parent*Renamed OGS1 XmlRpcLoginToSimulatorMethod to the more appropriate XmlRpcSimu... (diff)
downloadopensim-SC-e06ffb3981d29ddb3383690b4a05dc684813b6d9.zip
opensim-SC-e06ffb3981d29ddb3383690b4a05dc684813b6d9.tar.gz
opensim-SC-e06ffb3981d29ddb3383690b4a05dc684813b6d9.tar.bz2
opensim-SC-e06ffb3981d29ddb3383690b4a05dc684813b6d9.tar.xz
*Removed GridInfo class as it has been previously replaced with the much better NetworkServersInfo class
*Got the GridServer in OGS1 to go through with registering the region, but the actual storage of the region isnt working right now. **After this is fixed, grid mode should work!
Diffstat (limited to 'OpenSim/Region/Communications/OGS1')
-rw-r--r--OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs3
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs20
2 files changed, 16 insertions, 7 deletions
diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs
index 0a0847e..1118726 100644
--- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs
+++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs
@@ -5,9 +5,10 @@ namespace OpenSim.Region.Communications.OGS1
5{ 5{
6 public class CommunicationsOGS1 : CommunicationsManager 6 public class CommunicationsOGS1 : CommunicationsManager
7 { 7 {
8 private OGS1GridServices gridInterComms = new OGS1GridServices(); 8
9 public CommunicationsOGS1(NetworkServersInfo serversInfo) :base(serversInfo) 9 public CommunicationsOGS1(NetworkServersInfo serversInfo) :base(serversInfo)
10 { 10 {
11 OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo);
11 GridServer = gridInterComms; 12 GridServer = gridInterComms;
12 InterRegion = gridInterComms; 13 InterRegion = gridInterComms;
13 UserServer = new OGS1UserServices(this); 14 UserServer = new OGS1UserServices(this);
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 }