aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/IGridServices.cs9
-rw-r--r--OpenSim/Framework/General/Types/NetworkServersInfo.cs2
-rw-r--r--OpenSim/Grid/GridServer/GridManager.cs21
-rw-r--r--OpenSim/Grid/GridServer/Main.cs13
-rw-r--r--OpenSim/Grid/UserServer.Config/DbUserConfig.cs2
-rw-r--r--OpenSim/Region/Communications/Local/LocalBackEndServices.cs2
-rw-r--r--OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs3
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs20
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs4
9 files changed, 47 insertions, 29 deletions
diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs
index c168c20..c296209 100644
--- a/OpenSim/Framework/Communications/IGridServices.cs
+++ b/OpenSim/Framework/Communications/IGridServices.cs
@@ -31,16 +31,11 @@ using OpenSim.Framework.Types;
31 31
32namespace OpenSim.Framework.Communications 32namespace OpenSim.Framework.Communications
33{ 33{
34 public class GridInfo 34
35 {
36 public string GridServerURI = "http://grid.deepgrid.com:8001/"; // Temporarily hardcoded.
37 public string GridServerSendKey = "badger";
38 public string GridServerRecvKey = "badger";
39 }
40 35
41 public interface IGridServices 36 public interface IGridServices
42 { 37 {
43 RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo); 38 RegionCommsListener RegisterRegion(RegionInfo regionInfos);
44 List<RegionInfo> RequestNeighbours(RegionInfo regionInfo); 39 List<RegionInfo> RequestNeighbours(RegionInfo regionInfo);
45 RegionInfo RequestNeighbourInfo(ulong regionHandle); 40 RegionInfo RequestNeighbourInfo(ulong regionHandle);
46 List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); 41 List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY);
diff --git a/OpenSim/Framework/General/Types/NetworkServersInfo.cs b/OpenSim/Framework/General/Types/NetworkServersInfo.cs
index 89ebf94..142edc0 100644
--- a/OpenSim/Framework/General/Types/NetworkServersInfo.cs
+++ b/OpenSim/Framework/General/Types/NetworkServersInfo.cs
@@ -121,7 +121,7 @@ namespace OpenSim.Framework.Types
121 attri = configData.GetAttribute("GridServerURL"); 121 attri = configData.GetAttribute("GridServerURL");
122 if (attri == "") 122 if (attri == "")
123 { 123 {
124 this.GridURL = MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/"); 124 this.GridURL = MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:13801/");
125 configData.SetAttribute("GridServerURL", this.GridURL); 125 configData.SetAttribute("GridServerURL", this.GridURL);
126 } 126 }
127 else 127 else
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index 824a39e..816c9fd 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -217,7 +217,6 @@ namespace OpenSim.Grid.GridServer
217 /// <returns>Startup parameters</returns> 217 /// <returns>Startup parameters</returns>
218 public XmlRpcResponse XmlRpcSimulatorLoginMethod(XmlRpcRequest request) 218 public XmlRpcResponse XmlRpcSimulatorLoginMethod(XmlRpcRequest request)
219 { 219 {
220 Console.WriteLine("XMLRPC SIMULATOR LOGIN METHOD CALLED");
221 220
222 XmlRpcResponse response = new XmlRpcResponse(); 221 XmlRpcResponse response = new XmlRpcResponse();
223 Hashtable responseData = new Hashtable(); 222 Hashtable responseData = new Hashtable();
@@ -229,7 +228,6 @@ namespace OpenSim.Grid.GridServer
229 Console.WriteLine(requestData.ToString()); 228 Console.WriteLine(requestData.ToString());
230 if (requestData.ContainsKey("UUID")) 229 if (requestData.ContainsKey("UUID"))
231 { 230 {
232 Console.WriteLine("...VIA UUID");
233 TheSim = getRegion(new LLUUID((string)requestData["UUID"])); 231 TheSim = getRegion(new LLUUID((string)requestData["UUID"]));
234 logToDB((new LLUUID((string)requestData["UUID"])).ToStringHyphenated(),"XmlRpcSimulatorLoginMethod","", 5,"Region attempting login with UUID."); 232 logToDB((new LLUUID((string)requestData["UUID"])).ToStringHyphenated(),"XmlRpcSimulatorLoginMethod","", 5,"Region attempting login with UUID.");
235 } 233 }
@@ -248,7 +246,6 @@ namespace OpenSim.Grid.GridServer
248 if (TheSim == null) 246 if (TheSim == null)
249 { 247 {
250 //NEW REGION 248 //NEW REGION
251 Console.WriteLine("THIS IS A NEW REGION...ADDING");
252 TheSim = new SimProfileData(); 249 TheSim = new SimProfileData();
253 250
254 TheSim.regionRecvKey = config.SimRecvKey; 251 TheSim.regionRecvKey = config.SimRecvKey;
@@ -277,7 +274,23 @@ namespace OpenSim.Grid.GridServer
277 { 274 {
278 try 275 try
279 { 276 {
280 Console.WriteLine("ADDED");kvp.Value.AddProfile(TheSim); 277 DataResponse insertResponse = kvp.Value.AddProfile(TheSim);
278 switch(insertResponse)
279 {
280 case DataResponse.RESPONSE_OK:
281 Console.WriteLine("New sim creation successful: " + TheSim.regionName);
282 break;
283 case DataResponse.RESPONSE_ERROR:
284 Console.WriteLine("New sim creation failed (Error): " + TheSim.regionName);
285 break;
286 case DataResponse.RESPONSE_INVALIDCREDENTIALS:
287 Console.WriteLine("New sim creation failed (Invalid Credentials): " + TheSim.regionName);
288 break;
289 case DataResponse.RESPONSE_AUTHREQUIRED:
290 Console.WriteLine("New sim creation failed (Authentication Required): " + TheSim.regionName);
291 break;
292 }
293
281 } 294 }
282 catch (Exception) 295 catch (Exception)
283 { 296 {
diff --git a/OpenSim/Grid/GridServer/Main.cs b/OpenSim/Grid/GridServer/Main.cs
index 509549e..404c252 100644
--- a/OpenSim/Grid/GridServer/Main.cs
+++ b/OpenSim/Grid/GridServer/Main.cs
@@ -76,10 +76,11 @@ namespace OpenSim.Grid.GridServer
76 76
77 private void Work() 77 private void Work()
78 { 78 {
79 m_console.Notice("Enter help for a list of commands\n");
80
79 while (true) 81 while (true)
80 { 82 {
81 Thread.Sleep(5000); 83 m_console.MainLogPrompt();
82 // should flush the DB etc here
83 } 84 }
84 } 85 }
85 86
@@ -120,7 +121,7 @@ namespace OpenSim.Grid.GridServer
120 m_gridManager.config = Cfg; 121 m_gridManager.config = Cfg;
121 122
122 m_console.Verbose( "Main.cs:Startup() - Starting HTTP process"); 123 m_console.Verbose( "Main.cs:Startup() - Starting HTTP process");
123 BaseHttpServer httpServer = new BaseHttpServer(8001); 124 BaseHttpServer httpServer = new BaseHttpServer(13801);
124 //GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback); 125 //GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback);
125 126
126 httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcSimulatorLoginMethod); 127 httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcSimulatorLoginMethod);
@@ -142,9 +143,9 @@ namespace OpenSim.Grid.GridServer
142 //break; 143 //break;
143 144
144 // lbsa71 : I guess these were never used? 145 // lbsa71 : I guess these were never used?
145 //Listener.Prefixes.Add("http://+:8001/gods/"); 146 //Listener.Prefixes.Add("http://+:13801/gods/");
146 //Listener.Prefixes.Add("http://+:8001/highestuuid/"); 147 //Listener.Prefixes.Add("http://+:13801/highestuuid/");
147 //Listener.Prefixes.Add("http://+:8001/uuidblocks/"); 148 //Listener.Prefixes.Add("http://+:13801/uuidblocks/");
148 149
149 httpServer.Start(); 150 httpServer.Start();
150 151
diff --git a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs
index c7f8255..f57ac52 100644
--- a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs
+++ b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs
@@ -50,7 +50,7 @@ namespace OpenUser.Config.UserConfigDb4o
50 50
51 this.DefaultStartupMsg = MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS"); 51 this.DefaultStartupMsg = MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS");
52 52
53 this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/"); 53 this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:13801/");
54 this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server","null"); 54 this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server","null");
55 this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server","null"); 55 this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server","null");
56 } 56 }
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
index 43bdd03..d0cd991 100644
--- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.Communications.Local
49 /// </summary> 49 /// </summary>
50 /// <param name="regionInfo"></param> 50 /// <param name="regionInfo"></param>
51 /// <returns></returns> 51 /// <returns></returns>
52 public RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo) 52 public RegionCommsListener RegisterRegion(RegionInfo regionInfo)
53 { 53 {
54 //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); 54 //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering");
55 if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) 55 if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle))
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 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 2bc3f8c..d13b3ab 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -603,8 +603,8 @@ namespace OpenSim.Region.Environment.Scenes
603 /// </summary> 603 /// </summary>
604 public void RegisterRegionWithComms() 604 public void RegisterRegionWithComms()
605 { 605 {
606 GridInfo gridSettings = new GridInfo(); 606
607 this.regionCommsHost = this.commsManager.GridServer.RegisterRegion(this.m_regInfo, gridSettings); 607 this.regionCommsHost = this.commsManager.GridServer.RegisterRegion(this.m_regInfo);
608 if (this.regionCommsHost != null) 608 if (this.regionCommsHost != null)
609 { 609 {
610 this.regionCommsHost.OnExpectUser += this.NewUserConnection; 610 this.regionCommsHost.OnExpectUser += this.NewUserConnection;