diff options
author | Justin Clark-Casey (justincc) | 2011-08-22 02:10:45 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-22 02:10:45 +0100 |
commit | c587b0a3a38337fcd23d01e08c9a990abfab0569 (patch) | |
tree | ab0902ff313de34be1529cb753385bffc0ce8287 /OpenSim | |
parent | improve locking of m_agentHandlers in BaseHttpServer (diff) | |
download | opensim-SC-c587b0a3a38337fcd23d01e08c9a990abfab0569.zip opensim-SC-c587b0a3a38337fcd23d01e08c9a990abfab0569.tar.gz opensim-SC-c587b0a3a38337fcd23d01e08c9a990abfab0569.tar.bz2 opensim-SC-c587b0a3a38337fcd23d01e08c9a990abfab0569.tar.xz |
oops, fix build break from last commit
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index fd0621b..fce3671 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -56,7 +56,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
56 | private volatile int NotSocketErrors = 0; | 56 | private volatile int NotSocketErrors = 0; |
57 | public volatile bool HTTPDRunning = false; | 57 | public volatile bool HTTPDRunning = false; |
58 | 58 | ||
59 | protected Thread m_workerThread; | ||
60 | // protected HttpListener m_httpListener; | 59 | // protected HttpListener m_httpListener; |
61 | protected CoolHTTPListener m_httpListener2; | 60 | protected CoolHTTPListener m_httpListener2; |
62 | protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>(); | 61 | protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>(); |
@@ -243,7 +242,8 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
243 | 242 | ||
244 | public List<string> GetPollServiceHandlerKeys() | 243 | public List<string> GetPollServiceHandlerKeys() |
245 | { | 244 | { |
246 | return new List<string>(m_pollHandlers.Keys); | 245 | lock (m_pollHandlers) |
246 | return new List<string>(m_pollHandlers.Keys); | ||
247 | } | 247 | } |
248 | 248 | ||
249 | // Note that the agent string is provided simply to differentiate | 249 | // Note that the agent string is provided simply to differentiate |
@@ -1824,20 +1824,16 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1824 | 1824 | ||
1825 | public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler) | 1825 | public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler) |
1826 | { | 1826 | { |
1827 | try | 1827 | lock (m_agentHandlers) |
1828 | { | 1828 | { |
1829 | lock (m_agentHandlers) | 1829 | IHttpAgentHandler foundHandler; |
1830 | |||
1831 | if (m_agentHandlers.TryGetValue(agent, out foundHandler) && foundHandler == handler) | ||
1830 | { | 1832 | { |
1831 | if (handler == m_agentHandlers[agent]) | 1833 | m_agentHandlers.Remove(agent); |
1832 | { | 1834 | return true; |
1833 | m_agentHandlers.Remove(agent); | ||
1834 | return true; | ||
1835 | } | ||
1836 | } | 1835 | } |
1837 | } | 1836 | } |
1838 | catch(KeyNotFoundException) | ||
1839 | { | ||
1840 | } | ||
1841 | 1837 | ||
1842 | return false; | 1838 | return false; |
1843 | } | 1839 | } |