diff options
author | Justin Clark-Casey (justincc) | 2014-10-14 18:37:22 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-11-25 23:21:38 +0000 |
commit | 16a5e154436fc56235ac03846d4bb1ba4d21ac87 (patch) | |
tree | 19ed04e82bfa813519e7d55f70e575bfd5e4f585 /OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs | |
parent | Start JobEngine by default in simulator for now. (diff) | |
download | opensim-SC-16a5e154436fc56235ac03846d4bb1ba4d21ac87.zip opensim-SC-16a5e154436fc56235ac03846d4bb1ba4d21ac87.tar.gz opensim-SC-16a5e154436fc56235ac03846d4bb1ba4d21ac87.tar.bz2 opensim-SC-16a5e154436fc56235ac03846d4bb1ba4d21ac87.tar.xz |
Allow GetMesh capability to be served directly by a server like GetTexture
To do this required GetMesh to be converted to a BaseStreamHandler
Unlike GetTexture connector, no redirect URL functionality yet (this wasn't present in the first place).
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs index 8e1f63a..4aecc99 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs | |||
@@ -110,32 +110,29 @@ namespace OpenSim.Region.ClientStack.Linden | |||
110 | 110 | ||
111 | #endregion | 111 | #endregion |
112 | 112 | ||
113 | |||
114 | public void RegisterCaps(UUID agentID, Caps caps) | 113 | public void RegisterCaps(UUID agentID, Caps caps) |
115 | { | 114 | { |
116 | // UUID capID = UUID.Random(); | ||
117 | 115 | ||
118 | //caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture)); | 116 | //caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture)); |
119 | if (m_URL == "localhost") | 117 | if (m_URL == "localhost") |
120 | { | 118 | { |
121 | // m_log.DebugFormat("[GETMESH]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); | 119 | // m_log.DebugFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); |
122 | GetMeshHandler gmeshHandler = new GetMeshHandler(m_AssetService); | 120 | |
123 | IRequestHandler reqHandler | 121 | UUID capID = UUID.Random(); |
124 | = new RestHTTPHandler( | 122 | |
125 | "GET", | 123 | caps.RegisterHandler( |
126 | "/CAPS/" + UUID.Random(), | 124 | "GetMesh", |
127 | httpMethod => gmeshHandler.ProcessGetMesh(httpMethod, UUID.Zero, null), | 125 | new GetMeshHandler("/CAPS/" + capID + "/", m_AssetService, "GetMesh", agentID.ToString())); |
128 | "GetMesh", | ||
129 | agentID.ToString()); | ||
130 | |||
131 | caps.RegisterHandler("GetMesh", reqHandler); | ||
132 | } | 126 | } |
133 | else | 127 | else |
134 | { | 128 | { |
135 | // m_log.DebugFormat("[GETMESH]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName); | 129 | // m_log.DebugFormat("[GETTEXTURE]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName); |
136 | 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); | ||
137 | } | 135 | } |
138 | } | 136 | } |
139 | |||
140 | } | 137 | } |
141 | } | 138 | } \ No newline at end of file |