From 2d21052fa35f6d29017d8806bee4b81a96d1b052 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 1 May 2011 19:09:08 -0700 Subject: Start to drill down on GetTexture. Read the config and do different things. --- .../Region/ClientStack/Linden/Caps/GetTextureModule.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index 86c990f..21041ec 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs @@ -59,15 +59,20 @@ namespace OpenSim.Region.ClientStack.Linden private Scene m_scene; private IAssetService m_assetService; - public const string DefaultFormat = "x-j2c"; - // TODO: Change this to a config option const string REDIRECT_URL = null; + private string m_URL; + #region ISharedRegionModule Members - public void Initialise(IConfigSource pSource) + public void Initialise(IConfigSource source) { + IConfig config = source.Configs["ClientStack.LindenCaps"]; + if (config == null) + return; + + m_URL = config.GetString("Cap_GetTexture", "localhost"); } public void AddRegion(Scene s) @@ -105,7 +110,10 @@ namespace OpenSim.Region.ClientStack.Linden // m_log.InfoFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); //caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture)); - caps.RegisterHandler("GetTexture", new GetTextureHandler("/CAPS/" + capID + "/", m_assetService)); + if (m_URL == "localhost") + caps.RegisterHandler("GetTexture", new GetTextureHandler("/CAPS/" + capID + "/", m_assetService)); + else + caps.RegisterHandler("GetTexture", m_URL); } } -- cgit v1.1