From fde6a1665cf052194c7480be01048bb4bb549d7e Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 6 Jan 2009 14:44:45 +0000 Subject: * refactor: call AddHttpHandler() directly via CommsManager --- .../Modules/Communications/REST/RESTInterregionComms.cs | 2 +- .../Modules/Framework/EventQueue/EventQueueGetModule.cs | 5 +++-- .../Environment/Modules/World/WorldMap/WorldMapModule.cs | 2 +- OpenSim/Region/Environment/Scenes/Scene.cs | 15 --------------- 4 files changed, 5 insertions(+), 19 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Modules/Communications/REST/RESTInterregionComms.cs b/OpenSim/Region/Environment/Modules/Communications/REST/RESTInterregionComms.cs index 4daaab4..7a0bb9b 100644 --- a/OpenSim/Region/Environment/Modules/Communications/REST/RESTInterregionComms.cs +++ b/OpenSim/Region/Environment/Modules/Communications/REST/RESTInterregionComms.cs @@ -121,7 +121,7 @@ namespace OpenSim.Region.Environment.Modules.Communications.REST protected virtual void AddHTTPHandlers() { - m_aScene.AddHTTPHandler("/agent/", AgentHandler); + m_aScene.CommsManager.HttpServer.AddHTTPHandler("/agent/", AgentHandler); } #endregion /* IRegionModule */ diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs index 2a04348..9006fe0 100644 --- a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs @@ -233,7 +233,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue foreach (UUID ky in removeitems) { m_AvatarQueueUUIDMapping.Remove(ky); - m_scene.RemoveHTTPHandler("","/CAPS/EQG/" + ky.ToString() + "/"); + m_scene.CommsManager.HttpServer.RemoveHTTPHandler("","/CAPS/EQG/" + ky.ToString() + "/"); m_log.Debug("[EVENTQUEUE]: Removing " + "/CAPS/EQG/" + ky.ToString() + "/"); } @@ -328,7 +328,8 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue })); // This will persist this beyond the expiry of the caps handlers - m_scene.AddHTTPHandler(capsBase + EventQueueGetUUID.ToString() + "/", EventQueuePath2); + m_scene.CommsManager.HttpServer.AddHTTPHandler( + capsBase + EventQueueGetUUID.ToString() + "/", EventQueuePath2); Random rnd = new Random(System.Environment.TickCount); lock (m_ids) diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs index dd2fb49..6ce82ad 100644 --- a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs @@ -124,7 +124,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap regionimage = regionimage.Replace("-", ""); m_log.Warn("[WORLD MAP]: JPEG Map location: http://" + m_scene.RegionInfo.ExternalEndPoint.Address.ToString() + ":" + m_scene.RegionInfo.HttpPort.ToString() + "/index.php?method=" + regionimage); - m_scene.AddHTTPHandler(regionimage, OnHTTPGetMapImage); + m_scene.CommsManager.HttpServer.AddHTTPHandler(regionimage, OnHTTPGetMapImage); m_scene.CommsManager.HttpServer.AddLLSDHandler( "/MAP/MapItems/" + m_scene.RegionInfo.RegionHandle.ToString(), HandleRemoteMapItemRequest); diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index d6b3f0e..480b750 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -4178,20 +4178,6 @@ namespace OpenSim.Region.Environment.Scenes #endregion - #region BaseHTTPServer wrapper methods - - public bool AddHTTPHandler(string method, GenericHTTPMethod handler) - { - return m_httpListener.AddHTTPHandler(method, handler); - } - - public void RemoveHTTPHandler(string httpMethod, string path) - { - m_httpListener.RemoveHTTPHandler(httpMethod, path); - } - - #endregion - #region Avatar Appearance Default public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams) @@ -4480,7 +4466,6 @@ namespace OpenSim.Region.Environment.Scenes protected internal void jointMoved(PhysicsJoint joint) { - // m_parentScene.PhysicsScene.DumpJointInfo(); // non-thread-locked version; we should already be in a lock (OdeLock) when this callback is invoked // FIXME: this causes a sequential lookup of all objects in the scene; use a dictionary SceneObjectPart jointProxyObject = GetSceneObjectPart(joint.ObjectNameInScene); -- cgit v1.1