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/Console/RemoteConsole.cs | 10 ++-------- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 12 +++--------- .../Framework/Servers/HttpServer/Interfaces/IHttpServer.cs | 4 ++-- 3 files changed, 7 insertions(+), 19 deletions(-) (limited to 'OpenSim/Framework') 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 string uri = "/ReadResponses/" + sessionID.ToString() + "/"; - m_Server.AddPollServiceHTTPHandler(uri, HandleHttpPoll, - new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, - sessionID)); + m_Server.AddPollServiceHTTPHandler( + uri, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, sessionID)); XmlDocument xmldoc = new XmlDocument(); XmlNode xmlnode = xmldoc.CreateNode(XmlNodeType.XmlDeclaration, @@ -266,11 +265,6 @@ namespace OpenSim.Framework.Console return reply; } - private Hashtable HandleHttpPoll(Hashtable request) - { - return new Hashtable(); - } - private Hashtable HandleHttpCloseSession(Hashtable request) { 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 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 From 415b7b7ec4be9f87e7d5b65000e092d3372a4391 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 7 Dec 2011 17:31:57 +0000 Subject: Implement XMLRPCAdmin command admin_teleport_agent. This allows someone with access to this command on the XMLRPCAdmin interface to teleport an avatar to an arbitrary region and/or position. --- OpenSim/Framework/IScene.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs index 76b731f..7b0fe37 100644 --- a/OpenSim/Framework/IScene.cs +++ b/OpenSim/Framework/IScene.cs @@ -90,9 +90,9 @@ namespace OpenSim.Framework /// /// Is the agent denoted by the given agentID a child presence in this scene? /// - /// + /// /// Used by ClientView when a 'kick everyone' or 'estate message' occurs - /// + /// /// AvatarID to lookup /// true if the presence is a child agent, false if the presence is a root exception /// -- cgit v1.1