aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-01-12 19:37:56 +0000
committerJustin Clarke Casey2009-01-12 19:37:56 +0000
commitade107f04f42f448d0a7b34ae552cf54c3bf4f7e (patch)
tree3a3ca6b6104dd3f37e7596ebc27aa72d91c784d2 /OpenSim/Region/ClientStack
parentFix some C#3.0-isms that broke build in Mono 1.2.6 and MSVC# 2005. (diff)
downloadopensim-SC_OLD-ade107f04f42f448d0a7b34ae552cf54c3bf4f7e.zip
opensim-SC_OLD-ade107f04f42f448d0a7b34ae552cf54c3bf4f7e.tar.gz
opensim-SC_OLD-ade107f04f42f448d0a7b34ae552cf54c3bf4f7e.tar.bz2
opensim-SC_OLD-ade107f04f42f448d0a7b34ae552cf54c3bf4f7e.tar.xz
* Separate starting a client thread into a separate Start() method (which matches the existing Stop() and Restart() methods)
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs21
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs2
2 files changed, 14 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 3243c2f..ebbecb7 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -471,12 +471,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
471 m_PacketHandler.OnPacketStats += PopulateStats; 471 m_PacketHandler.OnPacketStats += PopulateStats;
472 472
473 RegisterLocalPacketHandlers(); 473 RegisterLocalPacketHandlers();
474
475 m_clientThread = new Thread(Start);
476 m_clientThread.Name = "ClientThread";
477 m_clientThread.IsBackground = true;
478 m_clientThread.Start();
479 ThreadTracker.Add(m_clientThread);
480 } 474 }
481 475
482 public void SetDebugPacketLevel(int newDebugPacketLevel) 476 public void SetDebugPacketLevel(int newDebugPacketLevel)
@@ -813,11 +807,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
813 RefreshGroupMembership(); 807 RefreshGroupMembership();
814 } 808 }
815 809
810 public virtual void Start()
811 {
812 m_clientThread = new Thread(RunUserSession);
813 m_clientThread.Name = "ClientThread";
814 m_clientThread.IsBackground = true;
815 m_clientThread.Start();
816 ThreadTracker.Add(m_clientThread);
817 }
818
816 /// <summary> 819 /// <summary>
817 /// Start a user session. This method lies at the base of the entire client thread. 820 /// Run a user session. This method lies at the base of the entire client thread.
818 /// </summary> 821 /// </summary>
819 protected virtual void Start() 822 protected virtual void RunUserSession()
820 { 823 {
821 //tell this thread we are using the culture set up for the sim (currently hardcoded to en_US) 824 //tell this thread we are using the culture set up for the sim (currently hardcoded to en_US)
822 //otherwise it will override this and use the system default 825 //otherwise it will override this and use the system default
823 Culture.SetCurrentCulture(); 826 Culture.SetCurrentCulture();
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs
index 9f8383c..2b52220 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs
@@ -160,6 +160,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
160 newuser.OnViewerEffect += m_scene.ClientManager.ViewerEffectHandler; 160 newuser.OnViewerEffect += m_scene.ClientManager.ViewerEffectHandler;
161 newuser.OnLogout += LogoutHandler; 161 newuser.OnLogout += LogoutHandler;
162 newuser.OnConnectionClosed += CloseClient; 162 newuser.OnConnectionClosed += CloseClient;
163
164 newuser.Start();
163 165
164 return true; 166 return true;
165 } 167 }