diff options
author | Diva Canto | 2011-05-01 19:09:08 -0700 |
---|---|---|
committer | Diva Canto | 2011-05-01 19:09:08 -0700 |
commit | 2d21052fa35f6d29017d8806bee4b81a96d1b052 (patch) | |
tree | ebd9c6e796110eff088b1d2210329d79f70513ec | |
parent | Broke down Caps.cs into a generic Caps object that simply registers/unregiste... (diff) | |
download | opensim-SC_OLD-2d21052fa35f6d29017d8806bee4b81a96d1b052.zip opensim-SC_OLD-2d21052fa35f6d29017d8806bee4b81a96d1b052.tar.gz opensim-SC_OLD-2d21052fa35f6d29017d8806bee4b81a96d1b052.tar.bz2 opensim-SC_OLD-2d21052fa35f6d29017d8806bee4b81a96d1b052.tar.xz |
Start to drill down on GetTexture. Read the config and do different things.
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs | 16 |
1 files changed, 12 insertions, 4 deletions
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 | |||
59 | private Scene m_scene; | 59 | private Scene m_scene; |
60 | private IAssetService m_assetService; | 60 | private IAssetService m_assetService; |
61 | 61 | ||
62 | public const string DefaultFormat = "x-j2c"; | ||
63 | |||
64 | // TODO: Change this to a config option | 62 | // TODO: Change this to a config option |
65 | const string REDIRECT_URL = null; | 63 | const string REDIRECT_URL = null; |
66 | 64 | ||
65 | private string m_URL; | ||
66 | |||
67 | #region ISharedRegionModule Members | 67 | #region ISharedRegionModule Members |
68 | 68 | ||
69 | public void Initialise(IConfigSource pSource) | 69 | public void Initialise(IConfigSource source) |
70 | { | 70 | { |
71 | IConfig config = source.Configs["ClientStack.LindenCaps"]; | ||
72 | if (config == null) | ||
73 | return; | ||
74 | |||
75 | m_URL = config.GetString("Cap_GetTexture", "localhost"); | ||
71 | } | 76 | } |
72 | 77 | ||
73 | public void AddRegion(Scene s) | 78 | public void AddRegion(Scene s) |
@@ -105,7 +110,10 @@ namespace OpenSim.Region.ClientStack.Linden | |||
105 | 110 | ||
106 | // m_log.InfoFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); | 111 | // m_log.InfoFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); |
107 | //caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture)); | 112 | //caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture)); |
108 | caps.RegisterHandler("GetTexture", new GetTextureHandler("/CAPS/" + capID + "/", m_assetService)); | 113 | if (m_URL == "localhost") |
114 | caps.RegisterHandler("GetTexture", new GetTextureHandler("/CAPS/" + capID + "/", m_assetService)); | ||
115 | else | ||
116 | caps.RegisterHandler("GetTexture", m_URL); | ||
109 | } | 117 | } |
110 | 118 | ||
111 | } | 119 | } |