aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie2011-10-25 03:26:44 +0100
committerMelanie2011-10-25 03:26:44 +0100
commitc8dfef15834b793dcffd3951ca4a86d68e5c9b45 (patch)
tree9e3df381662bfe781ad479c145d9e8e839c42a2b /OpenSim/Framework
parentMerge commit '79d5bc9beb445ca07cff9ecbd91d89b2a57e14da' into bigmerge (diff)
parentFix bugs in EventQueueGetModule.ClientClosed() and BaseHttpServer.RemovePollS... (diff)
downloadopensim-SC-c8dfef15834b793dcffd3951ca4a86d68e5c9b45.zip
opensim-SC-c8dfef15834b793dcffd3951ca4a86d68e5c9b45.tar.gz
opensim-SC-c8dfef15834b793dcffd3951ca4a86d68e5c9b45.tar.bz2
opensim-SC-c8dfef15834b793dcffd3951ca4a86d68e5c9b45.tar.xz
Merge commit '9ec672c70b28b8c1d6d81bab7744fcf7bf9b83c7' into bigmerge
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs4
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs10
2 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index a6bdc2d..33dec8d 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -1838,9 +1838,9 @@ namespace OpenSim.Framework.Servers.HttpServer
1838 { 1838 {
1839 lock (m_pollHandlers) 1839 lock (m_pollHandlers)
1840 { 1840 {
1841 if (m_pollHandlers.ContainsKey(httpMethod)) 1841 if (m_pollHandlers.ContainsKey(path))
1842 { 1842 {
1843 m_pollHandlers.Remove(httpMethod); 1843 m_pollHandlers.Remove(path);
1844 } 1844 }
1845 } 1845 }
1846 1846
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index e7a64f7..0840a9d 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -28,12 +28,16 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Threading; 30using System.Threading;
31using System.Reflection;
32using log4net;
31using HttpServer; 33using HttpServer;
32 34
33namespace OpenSim.Framework.Servers.HttpServer 35namespace OpenSim.Framework.Servers.HttpServer
34{ 36{
35 public class PollServiceRequestManager 37 public class PollServiceRequestManager
36 { 38 {
39// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40
37 private readonly BaseHttpServer m_server; 41 private readonly BaseHttpServer m_server;
38 private static Queue m_requests = Queue.Synchronized(new Queue()); 42 private static Queue m_requests = Queue.Synchronized(new Queue());
39 private uint m_WorkerThreadCount = 0; 43 private uint m_WorkerThreadCount = 0;
@@ -42,8 +46,6 @@ namespace OpenSim.Framework.Servers.HttpServer
42 private Thread m_watcherThread; 46 private Thread m_watcherThread;
43 private bool m_running = true; 47 private bool m_running = true;
44 48
45
46
47 public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout) 49 public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout)
48 { 50 {
49 m_server = pSrv; 51 m_server = pSrv;
@@ -61,7 +63,6 @@ namespace OpenSim.Framework.Servers.HttpServer
61 m_workerThreads[i].Name = String.Format("PollServiceWorkerThread{0}",i); 63 m_workerThreads[i].Name = String.Format("PollServiceWorkerThread{0}",i);
62 //Can't add to thread Tracker here Referencing OpenSim.Framework creates circular reference 64 //Can't add to thread Tracker here Referencing OpenSim.Framework creates circular reference
63 m_workerThreads[i].Start(); 65 m_workerThreads[i].Start();
64
65 } 66 }
66 67
67 //start watcher threads 68 //start watcher threads
@@ -98,7 +99,10 @@ namespace OpenSim.Framework.Servers.HttpServer
98 if (m_requests.Count == 0) 99 if (m_requests.Count == 0)
99 return; 100 return;
100 101
102// m_log.DebugFormat("[POLL SERVICE REQUEST MANAGER]: Processing {0} requests", m_requests.Count);
103
101 int reqperthread = (int) (m_requests.Count/m_WorkerThreadCount) + 1; 104 int reqperthread = (int) (m_requests.Count/m_WorkerThreadCount) + 1;
105
102 // For Each WorkerThread 106 // For Each WorkerThread
103 for (int tc = 0; tc < m_WorkerThreadCount && m_requests.Count > 0; tc++) 107 for (int tc = 0; tc < m_WorkerThreadCount && m_requests.Count > 0; tc++)
104 { 108 {