diff options
author | Justin Clark-Casey (justincc) | 2012-05-03 01:45:49 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-03 01:45:49 +0100 |
commit | 231a3bf147315a9284140476d2b09e13c3fee1c0 (patch) | |
tree | f04ffb5bb43d919c1687af57e4cb48829f6dc437 /OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |
parent | Comment out the five second sleep in etm.DoTeleport() if the old agent needs ... (diff) | |
download | opensim-SC-231a3bf147315a9284140476d2b09e13c3fee1c0.zip opensim-SC-231a3bf147315a9284140476d2b09e13c3fee1c0.tar.gz opensim-SC-231a3bf147315a9284140476d2b09e13c3fee1c0.tar.bz2 opensim-SC-231a3bf147315a9284140476d2b09e13c3fee1c0.tar.xz |
Implement optional name and description on http stream handlers so that we can relate a slow request to what the handler actually does and the agent it serves, if applicable.
This is most useful for capabilities where the url is not self-describing.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 47 |
1 files changed, 37 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index e20c24f..9791885 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -155,7 +155,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
155 | try | 155 | try |
156 | { | 156 | { |
157 | // the root of all evil | 157 | // the root of all evil |
158 | m_HostCapsObj.RegisterHandler("SEED", new RestStreamHandler("POST", capsBase + m_requestPath, SeedCapRequest)); | 158 | m_HostCapsObj.RegisterHandler( |
159 | "SEED", new RestStreamHandler("POST", capsBase + m_requestPath, SeedCapRequest, "SEED", null)); | ||
160 | |||
159 | m_log.DebugFormat( | 161 | m_log.DebugFormat( |
160 | "[CAPS]: Registered seed capability {0} for {1}", capsBase + m_requestPath, m_HostCapsObj.AgentID); | 162 | "[CAPS]: Registered seed capability {0} for {1}", capsBase + m_requestPath, m_HostCapsObj.AgentID); |
161 | 163 | ||
@@ -163,7 +165,10 @@ namespace OpenSim.Region.ClientStack.Linden | |||
163 | // new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST", | 165 | // new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST", |
164 | // capsBase + m_mapLayerPath, | 166 | // capsBase + m_mapLayerPath, |
165 | // GetMapLayer); | 167 | // GetMapLayer); |
166 | IRequestHandler req = new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory); | 168 | IRequestHandler req |
169 | = new RestStreamHandler( | ||
170 | "POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory, "UpdateScript", null); | ||
171 | |||
167 | m_HostCapsObj.RegisterHandler("UpdateScriptTaskInventory", req); | 172 | m_HostCapsObj.RegisterHandler("UpdateScriptTaskInventory", req); |
168 | m_HostCapsObj.RegisterHandler("UpdateScriptTask", req); | 173 | m_HostCapsObj.RegisterHandler("UpdateScriptTask", req); |
169 | } | 174 | } |
@@ -178,14 +183,27 @@ namespace OpenSim.Region.ClientStack.Linden | |||
178 | try | 183 | try |
179 | { | 184 | { |
180 | // I don't think this one works... | 185 | // I don't think this one works... |
181 | m_HostCapsObj.RegisterHandler("NewFileAgentInventory", new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST", | 186 | m_HostCapsObj.RegisterHandler( |
182 | capsBase + m_newInventory, | 187 | "NewFileAgentInventory", |
183 | NewAgentInventoryRequest)); | 188 | new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>( |
184 | IRequestHandler req = new RestStreamHandler("POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory); | 189 | "POST", |
190 | capsBase + m_newInventory, | ||
191 | NewAgentInventoryRequest, | ||
192 | "NewFileAgentInventory", | ||
193 | null)); | ||
194 | |||
195 | IRequestHandler req | ||
196 | = new RestStreamHandler( | ||
197 | "POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory, "Update*", null); | ||
198 | |||
185 | m_HostCapsObj.RegisterHandler("UpdateNotecardAgentInventory", req); | 199 | m_HostCapsObj.RegisterHandler("UpdateNotecardAgentInventory", req); |
186 | m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req); | 200 | m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req); |
187 | m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req); | 201 | m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req); |
188 | m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", new RestStreamHandler("POST", capsBase + m_copyFromNotecardPath, CopyInventoryFromNotecard)); | 202 | |
203 | m_HostCapsObj.RegisterHandler( | ||
204 | "CopyInventoryFromNotecard", | ||
205 | new RestStreamHandler( | ||
206 | "POST", capsBase + m_copyFromNotecardPath, CopyInventoryFromNotecard, "CopyInventoryFromNotecard", null)); | ||
189 | 207 | ||
190 | // As of RC 1.22.9 of the Linden client this is | 208 | // As of RC 1.22.9 of the Linden client this is |
191 | // supported | 209 | // supported |
@@ -289,7 +307,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
289 | m_dumpAssetsToFile); | 307 | m_dumpAssetsToFile); |
290 | uploader.OnUpLoad += TaskScriptUpdated; | 308 | uploader.OnUpLoad += TaskScriptUpdated; |
291 | 309 | ||
292 | m_HostCapsObj.HttpListener.AddStreamHandler(new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); | 310 | m_HostCapsObj.HttpListener.AddStreamHandler( |
311 | new BinaryStreamHandler( | ||
312 | "POST", capsBase + uploaderPath, uploader.uploaderCaps, "BunchOfCaps", null)); | ||
293 | 313 | ||
294 | string protocol = "http://"; | 314 | string protocol = "http://"; |
295 | 315 | ||
@@ -416,8 +436,14 @@ namespace OpenSim.Region.ClientStack.Linden | |||
416 | AssetUploader uploader = | 436 | AssetUploader uploader = |
417 | new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type, | 437 | new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type, |
418 | llsdRequest.asset_type, capsBase + uploaderPath, m_HostCapsObj.HttpListener, m_dumpAssetsToFile); | 438 | llsdRequest.asset_type, capsBase + uploaderPath, m_HostCapsObj.HttpListener, m_dumpAssetsToFile); |
439 | |||
419 | m_HostCapsObj.HttpListener.AddStreamHandler( | 440 | m_HostCapsObj.HttpListener.AddStreamHandler( |
420 | new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); | 441 | new BinaryStreamHandler( |
442 | "POST", | ||
443 | capsBase + uploaderPath, | ||
444 | uploader.uploaderCaps, | ||
445 | "NewAgentInventoryRequest", | ||
446 | m_HostCapsObj.AgentID.ToString())); | ||
421 | 447 | ||
422 | string protocol = "http://"; | 448 | string protocol = "http://"; |
423 | 449 | ||
@@ -733,7 +759,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
733 | uploader.OnUpLoad += ItemUpdated; | 759 | uploader.OnUpLoad += ItemUpdated; |
734 | 760 | ||
735 | m_HostCapsObj.HttpListener.AddStreamHandler( | 761 | m_HostCapsObj.HttpListener.AddStreamHandler( |
736 | new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); | 762 | new BinaryStreamHandler( |
763 | "POST", capsBase + uploaderPath, uploader.uploaderCaps, "NoteCardAgentInventory", null)); | ||
737 | 764 | ||
738 | string protocol = "http://"; | 765 | string protocol = "http://"; |
739 | 766 | ||