aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
diff options
context:
space:
mode:
authorMW2007-12-10 15:36:33 +0000
committerMW2007-12-10 15:36:33 +0000
commitbaea4b793d1979ea4e426287ff9ea301a775afb9 (patch)
treed70fab13d151620decfb1e4d819c066d23ce99a7 /OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
parentRefactored animation handling in ScenePresence. Now maintains a list of curre... (diff)
downloadopensim-SC-baea4b793d1979ea4e426287ff9ea301a775afb9.zip
opensim-SC-baea4b793d1979ea4e426287ff9ea301a775afb9.tar.gz
opensim-SC-baea4b793d1979ea4e426287ff9ea301a775afb9.tar.bz2
opensim-SC-baea4b793d1979ea4e426287ff9ea301a775afb9.tar.xz
Changed how TextureDownloadModule is initialised, due to some weird behaviour from the module loaded which was resulting in a lot of unused TextureDownloadModule objects being created (and each starting up a thread).
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/TextureDownloadModule.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
index 702af19..5019de3 100644
--- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
@@ -54,19 +54,25 @@ namespace OpenSim.Region.Environment.Modules
54 54
55 public TextureDownloadModule() 55 public TextureDownloadModule()
56 { 56 {
57 m_thread = new Thread(new ThreadStart(ProcessTextureSenders));
58 m_thread.IsBackground = true;
59 m_thread.Start();
60 } 57 }
61 58
62 public void Initialise(Scene scene, IConfigSource config) 59 public void Initialise(Scene scene, IConfigSource config)
63 { 60 {
61 if (m_scene == null)
62 {
63 Console.WriteLine("Creating Texture download module");
64 m_thread = new Thread(new ThreadStart(ProcessTextureSenders));
65 m_thread.IsBackground = true;
66 m_thread.Start();
67 }
68
64 if (!m_scenes.Contains(scene)) 69 if (!m_scenes.Contains(scene))
65 { 70 {
66 m_scenes.Add(scene); 71 m_scenes.Add(scene);
67 m_scene = scene; 72 m_scene = scene;
68 m_scene.EventManager.OnNewClient += NewClient; 73 m_scene.EventManager.OnNewClient += NewClient;
69 } 74 }
75
70 } 76 }
71 77
72 public void PostInitialise() 78 public void PostInitialise()
@@ -272,7 +278,7 @@ namespace OpenSim.Region.Environment.Modules
272 return false; 278 return false;
273 } 279 }
274 280
275 public void SendPacket() 281 private void SendPacket()
276 { 282 {
277 if (PacketCounter <= NumPackets) 283 if (PacketCounter <= NumPackets)
278 { 284 {