aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim.RegionServer/OpenSimMain.cs14
-rw-r--r--OpenSim.Servers/OpenGridProtocol.cs7
2 files changed, 18 insertions, 3 deletions
diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs
index edf4c62..1c3454d 100644
--- a/OpenSim.RegionServer/OpenSimMain.cs
+++ b/OpenSim.RegionServer/OpenSimMain.cs
@@ -82,9 +82,11 @@ namespace OpenSim
82 public string m_physicsEngine; 82 public string m_physicsEngine;
83 public bool m_sandbox = false; 83 public bool m_sandbox = false;
84 public bool m_loginserver; 84 public bool m_loginserver;
85 public OpenGridProtocolServer OGSServer;
85 public bool user_accounts = false; 86 public bool user_accounts = false;
86 public bool gridLocalAsset = false; 87 public bool gridLocalAsset = false;
87 88
89
88 protected ConsoleBase m_console; 90 protected ConsoleBase m_console;
89 91
90 public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine) 92 public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine)
@@ -203,7 +205,10 @@ namespace OpenSim
203 205
204 if (gridServer.GetName() == "Remote") 206 if (gridServer.GetName() == "Remote")
205 { 207 {
206 //we are in Grid mode so set a XmlRpc handler to handle "expect_user" calls from the user server 208 // should startup the OGS protocol server here
209 OGSServer = new OpenGridProtocolServer(8500);
210
211 // we are in Grid mode so set a XmlRpc handler to handle "expect_user" calls from the user server
207 httpServer.AddXmlRPCHandler("expect_user", 212 httpServer.AddXmlRPCHandler("expect_user",
208 delegate(XmlRpcRequest request) 213 delegate(XmlRpcRequest request)
209 { 214 {
@@ -293,7 +298,12 @@ namespace OpenSim
293 298
294 m_console.WriteLine("Main.cs:Startup() - Starting HTTP server"); 299 m_console.WriteLine("Main.cs:Startup() - Starting HTTP server");
295 httpServer.Start(); 300 httpServer.Start();
296 301
302 if(gridServer.GetName() == "Remote") {
303 m_console.WriteLine("Main.cs:Startup() - Starting up OGS protocol server");
304 OGSServer.Start();
305 }
306
297 MainServerListener(); 307 MainServerListener();
298 308
299 m_heartbeatTimer.Enabled = true; 309 m_heartbeatTimer.Enabled = true;
diff --git a/OpenSim.Servers/OpenGridProtocol.cs b/OpenSim.Servers/OpenGridProtocol.cs
index e3a7c3f..c3d7d5c 100644
--- a/OpenSim.Servers/OpenGridProtocol.cs
+++ b/OpenSim.Servers/OpenGridProtocol.cs
@@ -33,10 +33,12 @@ namespace OpenSim.Servers
33 33
34 private void DoWork() { 34 private void DoWork() {
35 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenGridProtocol.cs: ClientHandler.DoWork() - Got new client"); 35 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenGridProtocol.cs: ClientHandler.DoWork() - Got new client");
36 this.WriteLine("OpenSim 0.1, running OGS protocol 1.0");
36 37
37 } 38 }
38 39
39 private void WriteLine(string theline) { 40 private void WriteLine(string theline) {
41 theline+="\n";
40 byte[] thelinebuffer = System.Text.Encoding.ASCII.GetBytes(theline.ToCharArray()); 42 byte[] thelinebuffer = System.Text.Encoding.ASCII.GetBytes(theline.ToCharArray());
41 m_socketHandle.Send(thelinebuffer,theline.Length,0); 43 m_socketHandle.Send(thelinebuffer,theline.Length,0);
42 } 44 }
@@ -51,6 +53,7 @@ namespace OpenSim.Servers
51 { 53 {
52 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenGridProtocol.cs: Start() - Opening server socket"); 54 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenGridProtocol.cs: Start() - Opening server socket");
53 55
56 m_clients = new ArrayList();
54 m_workerThread = new Thread(new ThreadStart(StartServerSocket)); 57 m_workerThread = new Thread(new ThreadStart(StartServerSocket));
55 m_workerThread.IsBackground = true; 58 m_workerThread.IsBackground = true;
56 m_workerThread.Start(); 59 m_workerThread.Start();
@@ -72,7 +75,9 @@ namespace OpenSim.Servers
72 while (true) 75 while (true)
73 { 76 {
74 sockethandle = m_listenerSocket.Accept(); 77 sockethandle = m_listenerSocket.Accept();
75 m_clients.Add(new OpenGridProtocolServer.ClientHandler(sockethandle)); 78 lock(m_clients.SyncRoot) {
79 m_clients.Add(new OpenGridProtocolServer.ClientHandler(sockethandle));
80 }
76 } 81 }
77 } 82 }
78 catch (Exception e) 83 catch (Exception e)