diff options
5 files changed, 13 insertions, 36 deletions
diff --git a/OpenSim/Framework/Console/RemoteConsole.cs b/OpenSim/Framework/Console/RemoteConsole.cs index 07de27a..eabb62d 100644 --- a/OpenSim/Framework/Console/RemoteConsole.cs +++ b/OpenSim/Framework/Console/RemoteConsole.cs | |||
@@ -232,9 +232,8 @@ namespace OpenSim.Framework.Console | |||
232 | 232 | ||
233 | string uri = "/ReadResponses/" + sessionID.ToString() + "/"; | 233 | string uri = "/ReadResponses/" + sessionID.ToString() + "/"; |
234 | 234 | ||
235 | m_Server.AddPollServiceHTTPHandler(uri, HandleHttpPoll, | 235 | m_Server.AddPollServiceHTTPHandler( |
236 | new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, | 236 | uri, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, sessionID)); |
237 | sessionID)); | ||
238 | 237 | ||
239 | XmlDocument xmldoc = new XmlDocument(); | 238 | XmlDocument xmldoc = new XmlDocument(); |
240 | XmlNode xmlnode = xmldoc.CreateNode(XmlNodeType.XmlDeclaration, | 239 | XmlNode xmlnode = xmldoc.CreateNode(XmlNodeType.XmlDeclaration, |
@@ -266,11 +265,6 @@ namespace OpenSim.Framework.Console | |||
266 | return reply; | 265 | return reply; |
267 | } | 266 | } |
268 | 267 | ||
269 | private Hashtable HandleHttpPoll(Hashtable request) | ||
270 | { | ||
271 | return new Hashtable(); | ||
272 | } | ||
273 | |||
274 | private Hashtable HandleHttpCloseSession(Hashtable request) | 268 | private Hashtable HandleHttpCloseSession(Hashtable request) |
275 | { | 269 | { |
276 | DoExpire(); | 270 | DoExpire(); |
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 | |||
227 | return new List<string>(m_HTTPHandlers.Keys); | 227 | return new List<string>(m_HTTPHandlers.Keys); |
228 | } | 228 | } |
229 | 229 | ||
230 | public bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args) | 230 | public bool AddPollServiceHTTPHandler(string methodName, PollServiceEventArgs args) |
231 | { | 231 | { |
232 | bool pollHandlerResult = false; | ||
233 | lock (m_pollHandlers) | 232 | lock (m_pollHandlers) |
234 | { | 233 | { |
235 | if (!m_pollHandlers.ContainsKey(methodName)) | 234 | if (!m_pollHandlers.ContainsKey(methodName)) |
236 | { | 235 | { |
237 | m_pollHandlers.Add(methodName,args); | 236 | m_pollHandlers.Add(methodName, args); |
238 | pollHandlerResult = true; | 237 | return true; |
239 | } | 238 | } |
240 | } | 239 | } |
241 | 240 | ||
242 | if (pollHandlerResult) | ||
243 | return AddHTTPHandler(methodName, handler); | ||
244 | |||
245 | return false; | 241 | return false; |
246 | } | 242 | } |
247 | 243 | ||
@@ -1848,8 +1844,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1848 | { | 1844 | { |
1849 | lock (m_pollHandlers) | 1845 | lock (m_pollHandlers) |
1850 | m_pollHandlers.Remove(path); | 1846 | m_pollHandlers.Remove(path); |
1851 | |||
1852 | RemoveHTTPHandler(httpMethod, path); | ||
1853 | } | 1847 | } |
1854 | 1848 | ||
1855 | public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler) | 1849 | 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 | |||
77 | /// true if the handler was successfully registered, false if a handler with the same name already existed. | 77 | /// true if the handler was successfully registered, false if a handler with the same name already existed. |
78 | /// </returns> | 78 | /// </returns> |
79 | bool AddHTTPHandler(string methodName, GenericHTTPMethod handler); | 79 | bool AddHTTPHandler(string methodName, GenericHTTPMethod handler); |
80 | 80 | ||
81 | bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args); | 81 | bool AddPollServiceHTTPHandler(string methodName, PollServiceEventArgs args); |
82 | 82 | ||
83 | /// <summary> | 83 | /// <summary> |
84 | /// Adds a LLSD handler, yay. | 84 | /// Adds a LLSD handler, yay. |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 9f27abc..8ba6f61 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | |||
@@ -361,7 +361,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
361 | // This will persist this beyond the expiry of the caps handlers | 361 | // This will persist this beyond the expiry of the caps handlers |
362 | MainServer.Instance.AddPollServiceHTTPHandler( | 362 | MainServer.Instance.AddPollServiceHTTPHandler( |
363 | capsBase + EventQueueGetUUID.ToString() + "/", | 363 | capsBase + EventQueueGetUUID.ToString() + "/", |
364 | EventQueuePoll, | ||
365 | new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID)); | 364 | new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID)); |
366 | 365 | ||
367 | Random rnd = new Random(Environment.TickCount); | 366 | Random rnd = new Random(Environment.TickCount); |
@@ -578,11 +577,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
578 | // return responsedata; | 577 | // return responsedata; |
579 | // } | 578 | // } |
580 | 579 | ||
581 | public Hashtable EventQueuePoll(Hashtable request) | ||
582 | { | ||
583 | return new Hashtable(); | ||
584 | } | ||
585 | |||
586 | // public Hashtable EventQueuePath2(Hashtable request) | 580 | // public Hashtable EventQueuePath2(Hashtable request) |
587 | // { | 581 | // { |
588 | // string capuuid = (string)request["uri"]; //path.Replace("/CAPS/EQG/",""); | 582 | // string capuuid = (string)request["uri"]; //path.Replace("/CAPS/EQG/",""); |
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index 7377ceb..67d99e0 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | |||
@@ -90,11 +90,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
90 | get { return null; } | 90 | get { return null; } |
91 | } | 91 | } |
92 | 92 | ||
93 | private Hashtable HandleHttpPoll(Hashtable request) | ||
94 | { | ||
95 | return new Hashtable(); | ||
96 | } | ||
97 | |||
98 | public string Name | 93 | public string Name |
99 | { | 94 | { |
100 | get { return "UrlModule"; } | 95 | get { return "UrlModule"; } |
@@ -171,9 +166,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
171 | 166 | ||
172 | string uri = "/lslhttp/" + urlcode.ToString() + "/"; | 167 | string uri = "/lslhttp/" + urlcode.ToString() + "/"; |
173 | 168 | ||
174 | m_HttpServer.AddPollServiceHTTPHandler(uri,HandleHttpPoll, | 169 | m_HttpServer.AddPollServiceHTTPHandler( |
175 | new PollServiceEventArgs(HttpRequestHandler,HasEvents, GetEvents, NoEvents, | 170 | uri, |
176 | urlcode)); | 171 | new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, urlcode)); |
177 | 172 | ||
178 | engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url }); | 173 | engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url }); |
179 | } | 174 | } |
@@ -213,9 +208,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
213 | 208 | ||
214 | string uri = "/lslhttps/" + urlcode.ToString() + "/"; | 209 | string uri = "/lslhttps/" + urlcode.ToString() + "/"; |
215 | 210 | ||
216 | m_HttpsServer.AddPollServiceHTTPHandler(uri,HandleHttpPoll, | 211 | m_HttpsServer.AddPollServiceHTTPHandler( |
217 | new PollServiceEventArgs(HttpRequestHandler,HasEvents, GetEvents, NoEvents, | 212 | uri, |
218 | urlcode)); | 213 | new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, urlcode)); |
219 | 214 | ||
220 | engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url }); | 215 | engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url }); |
221 | } | 216 | } |