From 579f11b3b892a92c672a919b361b6961d302d234 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 6 Jan 2009 14:30:50 +0000 Subject: [PATCH] * refactor: call AddLLSDHandler directly via CommsManager --- .../Framework/EventQueue/EventQueueGetModule.cs | 2 +- .../Modules/InterGrid/OpenGridProtocolModule.cs | 8 +++++--- .../Modules/World/WorldMap/WorldMapModule.cs | 3 ++- OpenSim/Region/Environment/Scenes/Scene.cs | 10 ---------- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs index b1a202fd96..2a043482e1 100644 --- a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs @@ -91,7 +91,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue // Register fallback handler // Why does EQG Fail on region crossings! - //scene.AddLLSDHandler("/CAPS/EQG/", EventQueueFallBack); + //scene.CommsManager.HttpServer.AddLLSDHandler("/CAPS/EQG/", EventQueueFallBack); scene.EventManager.OnNewClient += OnNewClient; diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs index cbc4615e87..8534b5696e 100644 --- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs @@ -147,8 +147,8 @@ namespace OpenSim.Region.Environment.Modules.InterGrid { if (m_scene.Count == 0) { - scene.AddLLSDHandler("/agent/", ProcessAgentDomainMessage); - scene.AddLLSDHandler("/", ProcessRegionDomainSeed); + scene.CommsManager.HttpServer.AddLLSDHandler("/agent/", ProcessAgentDomainMessage); + scene.CommsManager.HttpServer.AddLLSDHandler("/", ProcessRegionDomainSeed); try { ServicePointManager.ServerCertificateValidationCallback += customXertificateValidation; @@ -173,7 +173,9 @@ namespace OpenSim.Region.Environment.Modules.InterGrid // a zero length region name would conflict with are base region seed cap if (!SceneListDuplicateCheck(scene.RegionInfo.RegionName) && scene.RegionInfo.RegionName.ToLower() != "agent" && scene.RegionInfo.RegionName.Length > 0) { - scene.AddLLSDHandler("/" + HttpUtility.UrlPathEncode(scene.RegionInfo.RegionName.ToLower()),ProcessRegionDomainSeed); + scene.CommsManager.HttpServer.AddLLSDHandler( + "/" + HttpUtility.UrlPathEncode(scene.RegionInfo.RegionName.ToLower()), + ProcessRegionDomainSeed); } if (!m_scene.Contains(scene)) diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs index 50fb0284c3..dd2fb49843 100644 --- a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs @@ -125,7 +125,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap 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.AddLLSDHandler("/MAP/MapItems/" + m_scene.RegionInfo.RegionHandle.ToString(), HandleRemoteMapItemRequest); + m_scene.CommsManager.HttpServer.AddLLSDHandler( + "/MAP/MapItems/" + m_scene.RegionInfo.RegionHandle.ToString(), HandleRemoteMapItemRequest); m_scene.EventManager.OnRegisterCaps += OnRegisterCaps; m_scene.EventManager.OnNewClient += OnNewClient; diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 8e6e2588fd..ac1461e487 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -4190,11 +4190,6 @@ namespace OpenSim.Region.Environment.Scenes m_httpListener.AddStreamHandler(handler); } - public bool AddLLSDHandler(string path, LLSDMethod handler) - { - return m_httpListener.AddLLSDHandler(path, handler); - } - public void RemoveStreamHandler(string httpMethod, string path) { m_httpListener.RemoveStreamHandler(httpMethod, path); @@ -4205,11 +4200,6 @@ namespace OpenSim.Region.Environment.Scenes m_httpListener.RemoveHTTPHandler(httpMethod, path); } - public bool RemoveLLSDHandler(string path, LLSDMethod handler) - { - return m_httpListener.RemoveLLSDHandler(path, handler); - } - #endregion #region Avatar Appearance Default