aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid')
-rw-r--r--OpenSim/Grid/GridServer/GridManager.cs63
-rw-r--r--OpenSim/Grid/GridServer/Main.cs5
-rw-r--r--OpenSim/Grid/MessagingServer/Main.cs8
-rw-r--r--OpenSim/Grid/UserServer/MessageServersConnector.cs4
4 files changed, 70 insertions, 10 deletions
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index 31500c0..61f1fd7 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -36,6 +36,8 @@ using Nwc.XmlRpc;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Framework.Console; 37using OpenSim.Framework.Console;
38using OpenSim.Framework.Data; 38using OpenSim.Framework.Data;
39using OpenSim.Framework.Servers;
40
39 41
40namespace OpenSim.Grid.GridServer 42namespace OpenSim.Grid.GridServer
41{ 43{
@@ -43,6 +45,7 @@ namespace OpenSim.Grid.GridServer
43 { 45 {
44 private Dictionary<string, IGridData> _plugins = new Dictionary<string, IGridData>(); 46 private Dictionary<string, IGridData> _plugins = new Dictionary<string, IGridData>();
45 private Dictionary<string, ILogData> _logplugins = new Dictionary<string, ILogData>(); 47 private Dictionary<string, ILogData> _logplugins = new Dictionary<string, ILogData>();
48 private List<MessageServerInfo> _MessageServers = new List<MessageServerInfo>();
46 49
47 public GridConfig config; 50 public GridConfig config;
48 51
@@ -414,7 +417,20 @@ namespace OpenSim.Grid.GridServer
414 417
415 responseData["allow_forceful_banlines"] = config.AllowForcefulBanlines; 418 responseData["allow_forceful_banlines"] = config.AllowForcefulBanlines;
416 419
420 // Instead of sending a multitude of message servers to the registering sim
421 // we should probably be sending a single one and parhaps it's backup
422 // that has responsibility over routing it's messages.
423
424 // The Sim won't be contacting us again about any of the message server stuff during it's time up.
425
426 responseData["messageserver_count"] = _MessageServers.Count;
417 427
428 for (int i = 0; i < _MessageServers.Count; i++)
429 {
430 responseData["messageserver_uri" + i] = _MessageServers[i].URI;
431 responseData["messageserver_sendkey" + i] = _MessageServers[i].sendkey;
432 responseData["messageserver_recvkey" + i] = _MessageServers[i].recvkey;
433 }
418 return response; 434 return response;
419 435
420 } 436 }
@@ -424,6 +440,7 @@ namespace OpenSim.Grid.GridServer
424 responseData["error"] = "Another region already exists at that location. Try another"; 440 responseData["error"] = "Another region already exists at that location. Try another";
425 return response; 441 return response;
426 } 442 }
443
427 } 444 }
428 445
429 public XmlRpcResponse XmlRpcSimulatorDataRequestMethod(XmlRpcRequest request) 446 public XmlRpcResponse XmlRpcSimulatorDataRequestMethod(XmlRpcRequest request)
@@ -767,5 +784,49 @@ namespace OpenSim.Grid.GridServer
767 return "ERROR! Could not save to database! (" + e.ToString() + ")"; 784 return "ERROR! Could not save to database! (" + e.ToString() + ")";
768 } 785 }
769 } 786 }
787 public XmlRpcResponse XmlRPCRegisterMessageServer(XmlRpcRequest request)
788 {
789 XmlRpcResponse response = new XmlRpcResponse();
790 Hashtable requestData = (Hashtable)request.Params[0];
791 Hashtable responseData = new Hashtable();
792
793 if (requestData.Contains("uri"))
794 {
795 string URI = (string)requestData["URI"];
796 string sendkey = (string)requestData["sendkey"];
797 string recvkey = (string)requestData["recvkey"];
798 MessageServerInfo m = new MessageServerInfo();
799 m.URI = URI;
800 m.sendkey = sendkey;
801 m.recvkey = recvkey;
802 if (!_MessageServers.Contains(m))
803 _MessageServers.Add(m);
804 responseData["responsestring"] = "TRUE";
805 response.Value = responseData;
806 }
807 return response;
808 }
809 public XmlRpcResponse XmlRPCDeRegisterMessageServer(XmlRpcRequest request)
810 {
811 XmlRpcResponse response = new XmlRpcResponse();
812 Hashtable requestData = (Hashtable)request.Params[0];
813 Hashtable responseData = new Hashtable();
814
815 if (requestData.Contains("uri"))
816 {
817 string URI = (string)requestData["uri"];
818 string sendkey = (string)requestData["sendkey"];
819 string recvkey = (string)requestData["recvkey"];
820 MessageServerInfo m = new MessageServerInfo();
821 m.URI = URI;
822 m.sendkey = sendkey;
823 m.recvkey = recvkey;
824 if (_MessageServers.Contains(m))
825 _MessageServers.Remove(m);
826 responseData["responsestring"] = "TRUE";
827 response.Value = responseData;
828 }
829 return response;
830 }
770 } 831 }
771} \ No newline at end of file 832}
diff --git a/OpenSim/Grid/GridServer/Main.cs b/OpenSim/Grid/GridServer/Main.cs
index cdd37c4..6bb4c75 100644
--- a/OpenSim/Grid/GridServer/Main.cs
+++ b/OpenSim/Grid/GridServer/Main.cs
@@ -119,6 +119,11 @@ namespace OpenSim.Grid.GridServer
119 httpServer.AddXmlRPCHandler("simulator_data_request", m_gridManager.XmlRpcSimulatorDataRequestMethod); 119 httpServer.AddXmlRPCHandler("simulator_data_request", m_gridManager.XmlRpcSimulatorDataRequestMethod);
120 httpServer.AddXmlRPCHandler("map_block", m_gridManager.XmlRpcMapBlockMethod); 120 httpServer.AddXmlRPCHandler("map_block", m_gridManager.XmlRpcMapBlockMethod);
121 121
122 // Message Server ---> Grid Server
123 httpServer.AddXmlRPCHandler("register_messageserver", m_gridManager.XmlRPCRegisterMessageServer);
124 httpServer.AddXmlRPCHandler("deregister_messageserver", m_gridManager.XmlRPCDeRegisterMessageServer);
125
126
122 httpServer.AddStreamHandler(new RestStreamHandler("GET", "/sims/", m_gridManager.RestGetSimMethod)); 127 httpServer.AddStreamHandler(new RestStreamHandler("GET", "/sims/", m_gridManager.RestGetSimMethod));
123 httpServer.AddStreamHandler(new RestStreamHandler("POST", "/sims/", m_gridManager.RestSetSimMethod)); 128 httpServer.AddStreamHandler(new RestStreamHandler("POST", "/sims/", m_gridManager.RestSetSimMethod));
124 129
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs
index 8f64113..a7c3a2a 100644
--- a/OpenSim/Grid/MessagingServer/Main.cs
+++ b/OpenSim/Grid/MessagingServer/Main.cs
@@ -85,13 +85,7 @@ namespace OpenSim.Grid.MessagingServer
85 { 85 {
86 Cfg = new MessageServerConfig("MESSAGING SERVER", (Path.Combine(Util.configDir(), "MessagingServer_Config.xml"))); 86 Cfg = new MessageServerConfig("MESSAGING SERVER", (Path.Combine(Util.configDir(), "MessagingServer_Config.xml")));
87 87
88 //MainLog.Instance.Verbose("REGION", "Establishing data connection"); 88
89 //m_userManager = new UserManager();
90 //m_userManager._config = Cfg;
91 //m_userManager.AddPlugin(Cfg.DatabaseProvider);
92
93 //m_loginService = new UserLoginService(
94 //m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg);
95 89
96 MainLog.Instance.Verbose("REGION", "Starting HTTP process"); 90 MainLog.Instance.Verbose("REGION", "Starting HTTP process");
97 BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort); 91 BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort);
diff --git a/OpenSim/Grid/UserServer/MessageServersConnector.cs b/OpenSim/Grid/UserServer/MessageServersConnector.cs
index deec739..7966868 100644
--- a/OpenSim/Grid/UserServer/MessageServersConnector.cs
+++ b/OpenSim/Grid/UserServer/MessageServersConnector.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Grid.UserServer
72 72
73 if (requestData.Contains("uri")) 73 if (requestData.Contains("uri"))
74 { 74 {
75 string URI = (string)requestData["URI"]; 75 string URI = (string)requestData["uri"];
76 string sendkey=(string)requestData["sendkey"]; 76 string sendkey=(string)requestData["sendkey"];
77 string recvkey=(string)requestData["recvkey"]; 77 string recvkey=(string)requestData["recvkey"];
78 MessageServerInfo m = new MessageServerInfo(); 78 MessageServerInfo m = new MessageServerInfo();
@@ -146,7 +146,7 @@ namespace OpenSim.Grid.UserServer
146 ArrayList SendParams = new ArrayList(); 146 ArrayList SendParams = new ArrayList();
147 SendParams.Add(reqparams); 147 SendParams.Add(reqparams);
148 148
149 XmlRpcRequest GridReq = new XmlRpcRequest("user_login", SendParams); 149 XmlRpcRequest GridReq = new XmlRpcRequest("login_to_simulator", SendParams);
150 XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); 150 XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000);
151 m_log.Verbose("LOGIN","Notified : " + serv.URI + " about user login"); 151 m_log.Verbose("LOGIN","Notified : " + serv.URI + " about user login");
152 152