From e6272b8d56dd7856faf374e7ac29460b4e74f1bb Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 7 Dec 2011 12:28:42 +0000 Subject: Stop also adding an ordinary http handler when we set up a poll http handler. It appears that this is entirely unnecessary since the poll http handlers are dealt with on a separate code path. --- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 12 +++--------- .../Framework/Servers/HttpServer/Interfaces/IHttpServer.cs | 4 ++-- 2 files changed, 5 insertions(+), 11 deletions(-) (limited to 'OpenSim/Framework/Servers/HttpServer') diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 6bffba5..a8ece79 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -227,21 +227,17 @@ namespace OpenSim.Framework.Servers.HttpServer return new List(m_HTTPHandlers.Keys); } - public bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args) + public bool AddPollServiceHTTPHandler(string methodName, PollServiceEventArgs args) { - bool pollHandlerResult = false; lock (m_pollHandlers) { if (!m_pollHandlers.ContainsKey(methodName)) { - m_pollHandlers.Add(methodName,args); - pollHandlerResult = true; + m_pollHandlers.Add(methodName, args); + return true; } } - if (pollHandlerResult) - return AddHTTPHandler(methodName, handler); - return false; } @@ -1848,8 +1844,6 @@ namespace OpenSim.Framework.Servers.HttpServer { lock (m_pollHandlers) m_pollHandlers.Remove(path); - - RemoveHTTPHandler(httpMethod, path); } public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler) diff --git a/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs index fd77984..db58f6f 100644 --- a/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs @@ -77,8 +77,8 @@ namespace OpenSim.Framework.Servers.HttpServer /// true if the handler was successfully registered, false if a handler with the same name already existed. /// bool AddHTTPHandler(string methodName, GenericHTTPMethod handler); - - bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args); + + bool AddPollServiceHTTPHandler(string methodName, PollServiceEventArgs args); /// /// Adds a LLSD handler, yay. -- cgit v1.1