aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Servers/OpenGridProtocol.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim.Servers/OpenGridProtocol.cs')
-rw-r--r--OpenSim.Servers/OpenGridProtocol.cs7
1 files changed, 6 insertions, 1 deletions
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)