aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorFreaky Tech2015-03-05 23:52:13 +0100
committerBlueWall2015-03-05 18:15:42 -0500
commit4de10a45e9136c75e33f31b448720db35c2c23b1 (patch)
treec31fa74823de340a22b51422c98714534227f28b /OpenSim/Region/ClientStack
parentadjusted new UserManagementModule to accept the HG UUI test harness (diff)
downloadopensim-SC-4de10a45e9136c75e33f31b448720db35c2c23b1.zip
opensim-SC-4de10a45e9136c75e33f31b448720db35c2c23b1.tar.gz
opensim-SC-4de10a45e9136c75e33f31b448720db35c2c23b1.tar.bz2
opensim-SC-4de10a45e9136c75e33f31b448720db35c2c23b1.tar.xz
revised GetMesh to not use intermediate base64 coding scheme
it delivers binary and has binary as input. base64 intermediate coding makes no sense. Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs59
1 files changed, 45 insertions, 14 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
index 4aecc99..f57d857 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
@@ -57,6 +57,9 @@ namespace OpenSim.Region.ClientStack.Linden
57 private IAssetService m_AssetService; 57 private IAssetService m_AssetService;
58 private bool m_Enabled = true; 58 private bool m_Enabled = true;
59 private string m_URL; 59 private string m_URL;
60 private string m_URL2;
61 private string m_RedirectURL = null;
62 private string m_RedirectURL2 = null;
60 63
61 #region Region Module interfaceBase Members 64 #region Region Module interfaceBase Members
62 65
@@ -74,7 +77,18 @@ namespace OpenSim.Region.ClientStack.Linden
74 m_URL = config.GetString("Cap_GetMesh", string.Empty); 77 m_URL = config.GetString("Cap_GetMesh", string.Empty);
75 // Cap doesn't exist 78 // Cap doesn't exist
76 if (m_URL != string.Empty) 79 if (m_URL != string.Empty)
80 {
81 m_Enabled = true;
82 m_RedirectURL = config.GetString("GetMeshRedirectURL");
83 }
84
85 m_URL2 = config.GetString("Cap_GetMesh2", string.Empty);
86 // Cap doesn't exist
87 if (m_URL2 != string.Empty)
88 {
77 m_Enabled = true; 89 m_Enabled = true;
90 m_RedirectURL2 = config.GetString("GetMesh2RedirectURL");
91 }
78 } 92 }
79 93
80 public void AddRegion(Scene pScene) 94 public void AddRegion(Scene pScene)
@@ -110,29 +124,46 @@ namespace OpenSim.Region.ClientStack.Linden
110 124
111 #endregion 125 #endregion
112 126
127
113 public void RegisterCaps(UUID agentID, Caps caps) 128 public void RegisterCaps(UUID agentID, Caps caps)
114 { 129 {
130 UUID capID = UUID.Random();
131 bool getMeshRegistered = false;
115 132
116 //caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture)); 133 if (m_URL == string.Empty)
117 if (m_URL == "localhost")
118 { 134 {
119 // m_log.DebugFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
120
121 UUID capID = UUID.Random();
122 135
136 }
137 else if (m_URL == "localhost")
138 {
139 getMeshRegistered = true;
123 caps.RegisterHandler( 140 caps.RegisterHandler(
124 "GetMesh", 141 "GetMesh",
125 new GetMeshHandler("/CAPS/" + capID + "/", m_AssetService, "GetMesh", agentID.ToString())); 142 new GetMeshHandler("/CAPS/" + capID + "/", m_AssetService, "GetMesh", agentID.ToString(), m_RedirectURL));
126 } 143 }
127 else 144 else
128 { 145 {
129 // m_log.DebugFormat("[GETTEXTURE]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName); 146 caps.RegisterHandler("GetMesh", m_URL);
130 IExternalCapsModule handler = m_scene.RequestModuleInterface<IExternalCapsModule>();
131 if (handler != null)
132 handler.RegisterExternalUserCapsHandler(agentID, caps, "GetMesh", m_URL);
133 else
134 caps.RegisterHandler("GetMesh", m_URL);
135 } 147 }
136 } 148
149 if(m_URL2 == string.Empty)
150 {
151
152 }
153 else if (m_URL2 == "localhost")
154 {
155 if (!getMeshRegistered)
156 {
157 caps.RegisterHandler(
158 "GetMesh2",
159 new GetMeshHandler("/CAPS/" + capID + "/", m_AssetService, "GetMesh2", agentID.ToString(), m_RedirectURL2));
160 }
161 }
162 else
163 {
164 caps.RegisterHandler("GetMesh2", m_URL2);
165 }
166 }
167
137 } 168 }
138} \ No newline at end of file 169}