aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDiva Canto2014-05-07 19:38:33 -0700
committerDiva Canto2014-05-07 19:38:33 -0700
commita845c1a893a203f1a9bc38dc754a6f94e4c02ea5 (patch)
treee2b9118deb856f87444b2062fa78e4adca900d42 /OpenSim/Region
parentDelete extraneous console message in the Configger. (diff)
downloadopensim-SC_OLD-a845c1a893a203f1a9bc38dc754a6f94e4c02ea5.zip
opensim-SC_OLD-a845c1a893a203f1a9bc38dc754a6f94e4c02ea5.tar.gz
opensim-SC_OLD-a845c1a893a203f1a9bc38dc754a6f94e4c02ea5.tar.bz2
opensim-SC_OLD-a845c1a893a203f1a9bc38dc754a6f94e4c02ea5.tar.xz
Finished implementing redirects in GetTexture.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
index 54cf285..bb932f2 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Region.ClientStack.Linden
63 private bool m_Enabled = false; 63 private bool m_Enabled = false;
64 64
65 // TODO: Change this to a config option 65 // TODO: Change this to a config option
66 const string REDIRECT_URL = null; 66 private string m_RedirectURL = null;
67 67
68 private string m_URL; 68 private string m_URL;
69 69
@@ -78,7 +78,10 @@ namespace OpenSim.Region.ClientStack.Linden
78 m_URL = config.GetString("Cap_GetTexture", string.Empty); 78 m_URL = config.GetString("Cap_GetTexture", string.Empty);
79 // Cap doesn't exist 79 // Cap doesn't exist
80 if (m_URL != string.Empty) 80 if (m_URL != string.Empty)
81 {
81 m_Enabled = true; 82 m_Enabled = true;
83 m_RedirectURL = config.GetString("GetTextureRedirectURL");
84 }
82 } 85 }
83 86
84 public void AddRegion(Scene s) 87 public void AddRegion(Scene s)
@@ -132,14 +135,14 @@ namespace OpenSim.Region.ClientStack.Linden
132// m_log.DebugFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); 135// m_log.DebugFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
133 caps.RegisterHandler( 136 caps.RegisterHandler(
134 "GetTexture", 137 "GetTexture",
135 new GetTextureHandler("/CAPS/" + capID + "/", m_assetService, "GetTexture", agentID.ToString())); 138 new GetTextureHandler("/CAPS/" + capID + "/", m_assetService, "GetTexture", agentID.ToString(), m_RedirectURL));
136 } 139 }
137 else 140 else
138 { 141 {
139// m_log.DebugFormat("[GETTEXTURE]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName); 142// m_log.DebugFormat("[GETTEXTURE]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName);
140 IExternalCapsModule handler = m_scene.RequestModuleInterface<IExternalCapsModule>(); 143 IExternalCapsModule handler = m_scene.RequestModuleInterface<IExternalCapsModule>();
141 if (handler != null) 144 if (handler != null)
142 handler.RegisterExternalUserCapsHandler(agentID,caps,"GetTexture",m_URL); 145 handler.RegisterExternalUserCapsHandler(agentID,caps,"GetTexture", m_URL);
143 else 146 else
144 caps.RegisterHandler("GetTexture", m_URL); 147 caps.RegisterHandler("GetTexture", m_URL);
145 } 148 }