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 | |
parent | Comment out the five second sleep in etm.DoTeleport() if the old agent needs ... (diff) | |
download | opensim-SC_OLD-231a3bf147315a9284140476d2b09e13c3fee1c0.zip opensim-SC_OLD-231a3bf147315a9284140476d2b09e13c3fee1c0.tar.gz opensim-SC_OLD-231a3bf147315a9284140476d2b09e13c3fee1c0.tar.bz2 opensim-SC_OLD-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 '')
20 files changed, 255 insertions, 164 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 5de3f25..79259d8 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -388,7 +388,7 @@ namespace OpenSim | |||
388 | scene.LoadPrimsFromStorage(regionInfo.originRegionID); | 388 | scene.LoadPrimsFromStorage(regionInfo.originRegionID); |
389 | 389 | ||
390 | // TODO : Try setting resource for region xstats here on scene | 390 | // TODO : Try setting resource for region xstats here on scene |
391 | MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); | 391 | MainServer.Instance.AddStreamHandler(new RegionStatsHandler(regionInfo)); |
392 | 392 | ||
393 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); | 393 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); |
394 | scene.EventManager.TriggerParcelPrimCountUpdate(); | 394 | scene.EventManager.TriggerParcelPrimCountUpdate(); |
@@ -773,6 +773,9 @@ namespace OpenSim | |||
773 | return Util.UTF8.GetBytes("OK"); | 773 | return Util.UTF8.GetBytes("OK"); |
774 | } | 774 | } |
775 | 775 | ||
776 | public string Name { get { return "SimStatus"; } } | ||
777 | public string Description { get { return "Simulator Status"; } } | ||
778 | |||
776 | public string ContentType | 779 | public string ContentType |
777 | { | 780 | { |
778 | get { return "text/plain"; } | 781 | get { return "text/plain"; } |
@@ -797,6 +800,9 @@ namespace OpenSim | |||
797 | { | 800 | { |
798 | OpenSimBase m_opensim; | 801 | OpenSimBase m_opensim; |
799 | string osXStatsURI = String.Empty; | 802 | string osXStatsURI = String.Empty; |
803 | |||
804 | public string Name { get { return "XSimStatus"; } } | ||
805 | public string Description { get { return "Simulator XStatus"; } } | ||
800 | 806 | ||
801 | public XSimStatusHandler(OpenSimBase sim) | 807 | public XSimStatusHandler(OpenSimBase sim) |
802 | { | 808 | { |
@@ -837,6 +843,9 @@ namespace OpenSim | |||
837 | { | 843 | { |
838 | OpenSimBase m_opensim; | 844 | OpenSimBase m_opensim; |
839 | string osUXStatsURI = String.Empty; | 845 | string osUXStatsURI = String.Empty; |
846 | |||
847 | public string Name { get { return "UXSimStatus"; } } | ||
848 | public string Description { get { return "Simulator UXStatus"; } } | ||
840 | 849 | ||
841 | public UXSimStatusHandler(OpenSimBase sim) | 850 | public UXSimStatusHandler(OpenSimBase sim) |
842 | { | 851 | { |
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 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 7c07c56..1a35d22 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | |||
@@ -351,14 +351,18 @@ namespace OpenSim.Region.ClientStack.Linden | |||
351 | // EventQueueGet when it receive capability information, but then we replace the rest handler immediately | 351 | // EventQueueGet when it receive capability information, but then we replace the rest handler immediately |
352 | // afterwards with the poll service. So for now, we'll pass a null instead to simplify code reading, but | 352 | // afterwards with the poll service. So for now, we'll pass a null instead to simplify code reading, but |
353 | // really it should be possible to directly register the poll handler as a capability. | 353 | // really it should be possible to directly register the poll handler as a capability. |
354 | caps.RegisterHandler("EventQueueGet", | 354 | caps.RegisterHandler( |
355 | new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/", null)); | 355 | "EventQueueGet", |
356 | new RestHTTPHandler( | ||
357 | "POST", capsBase + EventQueueGetUUID.ToString() + "/", null)); | ||
358 | |||
356 | // delegate(Hashtable m_dhttpMethod) | 359 | // delegate(Hashtable m_dhttpMethod) |
357 | // { | 360 | // { |
358 | // return ProcessQueue(m_dhttpMethod, agentID, caps); | 361 | // return ProcessQueue(m_dhttpMethod, agentID, caps); |
359 | // })); | 362 | // })); |
360 | 363 | ||
361 | // This will persist this beyond the expiry of the caps handlers | 364 | // This will persist this beyond the expiry of the caps handlers |
365 | // TODO: Add EventQueueGet name/description for diagnostics | ||
362 | MainServer.Instance.AddPollServiceHTTPHandler( | 366 | MainServer.Instance.AddPollServiceHTTPHandler( |
363 | capsBase + EventQueueGetUUID.ToString() + "/", | 367 | capsBase + EventQueueGetUUID.ToString() + "/", |
364 | new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID)); | 368 | new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID)); |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs b/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs index 14501c7..cb5afcc 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs | |||
@@ -132,7 +132,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
132 | capUrl = "/CAPS/" + UUID.Random(); | 132 | capUrl = "/CAPS/" + UUID.Random(); |
133 | 133 | ||
134 | IRequestHandler reqHandler | 134 | IRequestHandler reqHandler |
135 | = new RestStreamHandler("POST", capUrl, m_fetchHandler.FetchInventoryRequest); | 135 | = new RestStreamHandler( |
136 | "POST", capUrl, m_fetchHandler.FetchInventoryRequest, capName, agentID.ToString()); | ||
136 | 137 | ||
137 | caps.RegisterHandler(capName, reqHandler); | 138 | caps.RegisterHandler(capName, reqHandler); |
138 | } | 139 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs index e7bd2e7..0d7b1fc 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs | |||
@@ -120,11 +120,13 @@ namespace OpenSim.Region.ClientStack.Linden | |||
120 | { | 120 | { |
121 | // m_log.DebugFormat("[GETMESH]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); | 121 | // m_log.DebugFormat("[GETMESH]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); |
122 | GetMeshHandler gmeshHandler = new GetMeshHandler(m_AssetService); | 122 | GetMeshHandler gmeshHandler = new GetMeshHandler(m_AssetService); |
123 | IRequestHandler reqHandler = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), | 123 | IRequestHandler reqHandler |
124 | delegate(Hashtable m_dhttpMethod) | 124 | = new RestHTTPHandler( |
125 | { | 125 | "GET", |
126 | return gmeshHandler.ProcessGetMesh(m_dhttpMethod, UUID.Zero, null); | 126 | "/CAPS/" + UUID.Random(), |
127 | }); | 127 | httpMethod => gmeshHandler.ProcessGetMesh(httpMethod, UUID.Zero, null), |
128 | "GetMesh", | ||
129 | agentID.ToString()); | ||
128 | 130 | ||
129 | caps.RegisterHandler("GetMesh", reqHandler); | 131 | caps.RegisterHandler("GetMesh", reqHandler); |
130 | } | 132 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index fffcee2..5ae9cc3 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs | |||
@@ -130,7 +130,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
130 | if (m_URL == "localhost") | 130 | if (m_URL == "localhost") |
131 | { | 131 | { |
132 | // m_log.DebugFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); | 132 | // m_log.DebugFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); |
133 | caps.RegisterHandler("GetTexture", new GetTextureHandler("/CAPS/" + capID + "/", m_assetService)); | 133 | caps.RegisterHandler( |
134 | "GetTexture", | ||
135 | new GetTextureHandler("/CAPS/" + capID + "/", m_assetService, "GetTexture", agentID.ToString())); | ||
134 | } | 136 | } |
135 | else | 137 | else |
136 | { | 138 | { |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs index 18c7eae..44a6883 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs | |||
@@ -117,7 +117,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
117 | 117 | ||
118 | public void RegisterCaps(UUID agentID, Caps caps) | 118 | public void RegisterCaps(UUID agentID, Caps caps) |
119 | { | 119 | { |
120 | IRequestHandler reqHandler = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), MeshUploadFlag); | 120 | IRequestHandler reqHandler |
121 | = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), MeshUploadFlag, "MeshUploadFlag", agentID.ToString()); | ||
122 | |||
121 | caps.RegisterHandler("MeshUploadFlag", reqHandler); | 123 | caps.RegisterHandler("MeshUploadFlag", reqHandler); |
122 | m_agentID = agentID; | 124 | m_agentID = agentID; |
123 | } | 125 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs index 91872c5..52c4f44 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs | |||
@@ -115,67 +115,66 @@ namespace OpenSim.Region.ClientStack.Linden | |||
115 | UUID capID = UUID.Random(); | 115 | UUID capID = UUID.Random(); |
116 | 116 | ||
117 | // m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID); | 117 | // m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID); |
118 | caps.RegisterHandler("NewFileAgentInventoryVariablePrice", | 118 | caps.RegisterHandler( |
119 | 119 | "NewFileAgentInventoryVariablePrice", | |
120 | new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDNewFileAngentInventoryVariablePriceReplyResponse>("POST", | 120 | new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDNewFileAngentInventoryVariablePriceReplyResponse>( |
121 | "/CAPS/" + capID.ToString(), | 121 | "POST", |
122 | delegate(LLSDAssetUploadRequest req) | 122 | "/CAPS/" + capID.ToString(), |
123 | { | 123 | req => NewAgentInventoryRequest(req, agentID), |
124 | return NewAgentInventoryRequest(req,agentID); | 124 | "NewFileAgentInventoryVariablePrice", |
125 | })); | 125 | agentID.ToString())); |
126 | |||
127 | } | 126 | } |
128 | 127 | ||
129 | #endregion | 128 | #endregion |
130 | 129 | ||
131 | public LLSDNewFileAngentInventoryVariablePriceReplyResponse NewAgentInventoryRequest(LLSDAssetUploadRequest llsdRequest, UUID agentID) | 130 | public LLSDNewFileAngentInventoryVariablePriceReplyResponse NewAgentInventoryRequest(LLSDAssetUploadRequest llsdRequest, UUID agentID) |
132 | { | 131 | { |
133 | |||
134 | //TODO: The Mesh uploader uploads many types of content. If you're going to implement a Money based limit | 132 | //TODO: The Mesh uploader uploads many types of content. If you're going to implement a Money based limit |
135 | // You need to be aware of this and | 133 | // you need to be aware of this |
136 | |||
137 | 134 | ||
138 | //if (llsdRequest.asset_type == "texture" || | 135 | //if (llsdRequest.asset_type == "texture" || |
139 | // llsdRequest.asset_type == "animation" || | 136 | // llsdRequest.asset_type == "animation" || |
140 | // llsdRequest.asset_type == "sound") | 137 | // llsdRequest.asset_type == "sound") |
141 | // { | 138 | // { |
142 | // check user level | 139 | // check user level |
143 | ScenePresence avatar = null; | ||
144 | IClientAPI client = null; | ||
145 | m_scene.TryGetScenePresence(agentID, out avatar); | ||
146 | 140 | ||
147 | if (avatar != null) | 141 | ScenePresence avatar = null; |
142 | IClientAPI client = null; | ||
143 | m_scene.TryGetScenePresence(agentID, out avatar); | ||
144 | |||
145 | if (avatar != null) | ||
146 | { | ||
147 | client = avatar.ControllingClient; | ||
148 | |||
149 | if (avatar.UserLevel < m_levelUpload) | ||
148 | { | 150 | { |
149 | client = avatar.ControllingClient; | 151 | if (client != null) |
150 | 152 | client.SendAgentAlertMessage("Unable to upload asset. Insufficient permissions.", false); | |
151 | if (avatar.UserLevel < m_levelUpload) | 153 | |
152 | { | 154 | LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse(); |
153 | if (client != null) | 155 | errorResponse.rsvp = ""; |
154 | client.SendAgentAlertMessage("Unable to upload asset. Insufficient permissions.", false); | 156 | errorResponse.state = "error"; |
155 | 157 | return errorResponse; | |
156 | LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse(); | ||
157 | errorResponse.rsvp = ""; | ||
158 | errorResponse.state = "error"; | ||
159 | return errorResponse; | ||
160 | } | ||
161 | } | 158 | } |
159 | } | ||
162 | 160 | ||
163 | // check funds | 161 | // check funds |
164 | IMoneyModule mm = m_scene.RequestModuleInterface<IMoneyModule>(); | 162 | IMoneyModule mm = m_scene.RequestModuleInterface<IMoneyModule>(); |
165 | 163 | ||
166 | if (mm != null) | 164 | if (mm != null) |
165 | { | ||
166 | if (!mm.UploadCovered(agentID, mm.UploadCharge)) | ||
167 | { | 167 | { |
168 | if (!mm.UploadCovered(agentID, mm.UploadCharge)) | 168 | if (client != null) |
169 | { | 169 | client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); |
170 | if (client != null) | 170 | |
171 | client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); | 171 | LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse(); |
172 | 172 | errorResponse.rsvp = ""; | |
173 | LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse(); | 173 | errorResponse.state = "error"; |
174 | errorResponse.rsvp = ""; | 174 | return errorResponse; |
175 | errorResponse.state = "error"; | ||
176 | return errorResponse; | ||
177 | } | ||
178 | } | 175 | } |
176 | } | ||
177 | |||
179 | // } | 178 | // } |
180 | 179 | ||
181 | string assetName = llsdRequest.name; | 180 | string assetName = llsdRequest.name; |
@@ -189,8 +188,14 @@ namespace OpenSim.Region.ClientStack.Linden | |||
189 | AssetUploader uploader = | 188 | AssetUploader uploader = |
190 | new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type, | 189 | new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type, |
191 | llsdRequest.asset_type, capsBase + uploaderPath, MainServer.Instance, m_dumpAssetsToFile); | 190 | llsdRequest.asset_type, capsBase + uploaderPath, MainServer.Instance, m_dumpAssetsToFile); |
191 | |||
192 | MainServer.Instance.AddStreamHandler( | 192 | MainServer.Instance.AddStreamHandler( |
193 | new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); | 193 | new BinaryStreamHandler( |
194 | "POST", | ||
195 | capsBase + uploaderPath, | ||
196 | uploader.uploaderCaps, | ||
197 | "NewFileAgentInventoryVariablePrice", | ||
198 | agentID.ToString())); | ||
194 | 199 | ||
195 | string protocol = "http://"; | 200 | string protocol = "http://"; |
196 | 201 | ||
@@ -199,10 +204,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
199 | 204 | ||
200 | string uploaderURL = protocol + m_scene.RegionInfo.ExternalHostName + ":" + MainServer.Instance.Port.ToString() + capsBase + | 205 | string uploaderURL = protocol + m_scene.RegionInfo.ExternalHostName + ":" + MainServer.Instance.Port.ToString() + capsBase + |
201 | uploaderPath; | 206 | uploaderPath; |
202 | 207 | ||
203 | 208 | ||
204 | LLSDNewFileAngentInventoryVariablePriceReplyResponse uploadResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse(); | 209 | LLSDNewFileAngentInventoryVariablePriceReplyResponse uploadResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse(); |
205 | |||
206 | 210 | ||
207 | uploadResponse.rsvp = uploaderURL; | 211 | uploadResponse.rsvp = uploaderURL; |
208 | uploadResponse.state = "upload"; | 212 | uploadResponse.state = "upload"; |
@@ -220,6 +224,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
220 | pinventoryItem, pparentFolder, pdata, pinventoryType, | 224 | pinventoryItem, pparentFolder, pdata, pinventoryType, |
221 | passetType,agentID); | 225 | passetType,agentID); |
222 | }; | 226 | }; |
227 | |||
223 | return uploadResponse; | 228 | return uploadResponse; |
224 | } | 229 | } |
225 | 230 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs index 1c47f0e..4ccfc43 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs | |||
@@ -66,12 +66,14 @@ namespace OpenSim.Region.ClientStack.Linden | |||
66 | 66 | ||
67 | // m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/"); | 67 | // m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/"); |
68 | 68 | ||
69 | caps.RegisterHandler("ObjectAdd", | 69 | caps.RegisterHandler( |
70 | new RestHTTPHandler("POST", "/CAPS/OA/" + capuuid + "/", | 70 | "ObjectAdd", |
71 | delegate(Hashtable m_dhttpMethod) | 71 | new RestHTTPHandler( |
72 | { | 72 | "POST", |
73 | return ProcessAdd(m_dhttpMethod, agentID, caps); | 73 | "/CAPS/OA/" + capuuid + "/", |
74 | })); | 74 | httpMethod => ProcessAdd(httpMethod, agentID, caps), |
75 | "ObjectAdd", | ||
76 | agentID.ToString()));; | ||
75 | } | 77 | } |
76 | 78 | ||
77 | public Hashtable ProcessAdd(Hashtable request, UUID AgentId, Caps cap) | 79 | public Hashtable ProcessAdd(Hashtable request, UUID AgentId, Caps cap) |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs index 7a3d97e..f0f3984 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs | |||
@@ -106,12 +106,15 @@ namespace OpenSim.Region.ClientStack.Linden | |||
106 | UUID capID = UUID.Random(); | 106 | UUID capID = UUID.Random(); |
107 | 107 | ||
108 | // m_log.Debug("[UPLOAD OBJECT ASSET MODULE]: /CAPS/" + capID); | 108 | // m_log.Debug("[UPLOAD OBJECT ASSET MODULE]: /CAPS/" + capID); |
109 | caps.RegisterHandler("UploadObjectAsset", | 109 | caps.RegisterHandler( |
110 | new RestHTTPHandler("POST", "/CAPS/OA/" + capID + "/", | 110 | "UploadObjectAsset", |
111 | delegate(Hashtable m_dhttpMethod) | 111 | new RestHTTPHandler( |
112 | { | 112 | "POST", |
113 | return ProcessAdd(m_dhttpMethod, agentID, caps); | 113 | "/CAPS/OA/" + capID + "/", |
114 | })); | 114 | httpMethod => ProcessAdd(httpMethod, agentID, caps), |
115 | "UploadObjectAsset", | ||
116 | agentID.ToString())); | ||
117 | |||
115 | /* | 118 | /* |
116 | caps.RegisterHandler("NewFileAgentInventoryVariablePrice", | 119 | caps.RegisterHandler("NewFileAgentInventoryVariablePrice", |
117 | 120 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs index 1dd8938..8ed0fb3 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs | |||
@@ -154,7 +154,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
154 | public void RegisterCaps(UUID agentID, Caps caps) | 154 | public void RegisterCaps(UUID agentID, Caps caps) |
155 | { | 155 | { |
156 | IRequestHandler reqHandler | 156 | IRequestHandler reqHandler |
157 | = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), HandleSimulatorFeaturesRequest); | 157 | = new RestHTTPHandler( |
158 | "GET", "/CAPS/" + UUID.Random(), | ||
159 | HandleSimulatorFeaturesRequest, "SimulatorFeatures", agentID.ToString()); | ||
158 | 160 | ||
159 | caps.RegisterHandler("SimulatorFeatures", reqHandler); | 161 | caps.RegisterHandler("SimulatorFeatures", reqHandler); |
160 | } | 162 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs index 45d6071..b3d61a8 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs | |||
@@ -106,7 +106,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
106 | "POST", | 106 | "POST", |
107 | "/CAPS/" + caps.CapsObjectPath + m_uploadBakedTexturePath, | 107 | "/CAPS/" + caps.CapsObjectPath + m_uploadBakedTexturePath, |
108 | new UploadBakedTextureHandler( | 108 | new UploadBakedTextureHandler( |
109 | caps, m_scene.AssetService, m_persistBakedTextures).UploadBakedTexture)); | 109 | caps, m_scene.AssetService, m_persistBakedTextures).UploadBakedTexture, |
110 | "UploadBakedTexture", | ||
111 | agentID.ToString())); | ||
110 | } | 112 | } |
111 | } | 113 | } |
112 | } \ No newline at end of file | 114 | } \ No newline at end of file |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index 10f43d1..2359bd6 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs | |||
@@ -144,7 +144,12 @@ namespace OpenSim.Region.ClientStack.Linden | |||
144 | capUrl = "/CAPS/" + UUID.Random(); | 144 | capUrl = "/CAPS/" + UUID.Random(); |
145 | 145 | ||
146 | IRequestHandler reqHandler | 146 | IRequestHandler reqHandler |
147 | = new RestStreamHandler("POST", capUrl, m_webFetchHandler.FetchInventoryDescendentsRequest); | 147 | = new RestStreamHandler( |
148 | "POST", | ||
149 | capUrl, | ||
150 | m_webFetchHandler.FetchInventoryDescendentsRequest, | ||
151 | "FetchInventoryDescendents2", | ||
152 | agentID.ToString()); | ||
148 | 153 | ||
149 | caps.RegisterHandler(capName, reqHandler); | 154 | caps.RegisterHandler(capName, reqHandler); |
150 | } | 155 | } |
@@ -160,4 +165,4 @@ namespace OpenSim.Region.ClientStack.Linden | |||
160 | // capName, capUrl, m_scene.RegionInfo.RegionName, agentID); | 165 | // capName, capUrl, m_scene.RegionInfo.RegionName, agentID); |
161 | } | 166 | } |
162 | } | 167 | } |
163 | } | 168 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index f6d4b40..8b7406d 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -1433,21 +1433,26 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1433 | private void EventManagerOnRegisterCaps(UUID agentID, Caps caps) | 1433 | private void EventManagerOnRegisterCaps(UUID agentID, Caps caps) |
1434 | { | 1434 | { |
1435 | string capsBase = "/CAPS/" + caps.CapsObjectPath; | 1435 | string capsBase = "/CAPS/" + caps.CapsObjectPath; |
1436 | caps.RegisterHandler("RemoteParcelRequest", | 1436 | caps.RegisterHandler( |
1437 | new RestStreamHandler("POST", capsBase + remoteParcelRequestPath, | 1437 | "RemoteParcelRequest", |
1438 | delegate(string request, string path, string param, | 1438 | new RestStreamHandler( |
1439 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 1439 | "POST", |
1440 | { | 1440 | capsBase + remoteParcelRequestPath, |
1441 | return RemoteParcelRequest(request, path, param, agentID, caps); | 1441 | (request, path, param, httpRequest, httpResponse) |
1442 | })); | 1442 | => RemoteParcelRequest(request, path, param, agentID, caps), |
1443 | "RemoteParcelRequest", | ||
1444 | agentID.ToString())); | ||
1445 | |||
1443 | UUID parcelCapID = UUID.Random(); | 1446 | UUID parcelCapID = UUID.Random(); |
1444 | caps.RegisterHandler("ParcelPropertiesUpdate", | 1447 | caps.RegisterHandler( |
1445 | new RestStreamHandler("POST", "/CAPS/" + parcelCapID, | 1448 | "ParcelPropertiesUpdate", |
1446 | delegate(string request, string path, string param, | 1449 | new RestStreamHandler( |
1447 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 1450 | "POST", |
1448 | { | 1451 | "/CAPS/" + parcelCapID, |
1449 | return ProcessPropertiesUpdate(request, path, param, agentID, caps); | 1452 | (request, path, param, httpRequest, httpResponse) |
1450 | })); | 1453 | => ProcessPropertiesUpdate(request, path, param, agentID, caps), |
1454 | "ParcelPropertiesUpdate", | ||
1455 | agentID.ToString())); | ||
1451 | } | 1456 | } |
1452 | private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) | 1457 | private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) |
1453 | { | 1458 | { |
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 5239f50..601e81e 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | |||
@@ -145,7 +145,9 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap | |||
145 | 145 | ||
146 | // Even though we're registering for POST we're going to get GETS and UPDATES too | 146 | // Even though we're registering for POST we're going to get GETS and UPDATES too |
147 | caps.RegisterHandler( | 147 | caps.RegisterHandler( |
148 | "ObjectMedia", new RestStreamHandler("POST", omCapUrl, HandleObjectMediaMessage)); | 148 | "ObjectMedia", |
149 | new RestStreamHandler( | ||
150 | "POST", omCapUrl, HandleObjectMediaMessage, "ObjectMedia", agentID.ToString())); | ||
149 | } | 151 | } |
150 | 152 | ||
151 | string omuCapUrl = "/CAPS/" + UUID.Random(); | 153 | string omuCapUrl = "/CAPS/" + UUID.Random(); |
@@ -157,7 +159,9 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap | |||
157 | 159 | ||
158 | // Even though we're registering for POST we're going to get GETS and UPDATES too | 160 | // Even though we're registering for POST we're going to get GETS and UPDATES too |
159 | caps.RegisterHandler( | 161 | caps.RegisterHandler( |
160 | "ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage)); | 162 | "ObjectMediaNavigate", |
163 | new RestStreamHandler( | ||
164 | "POST", omuCapUrl, HandleObjectMediaNavigateMessage, "ObjectMediaNavigate", agentID.ToString())); | ||
161 | } | 165 | } |
162 | } | 166 | } |
163 | 167 | ||
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index faaf928..2335bea 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -190,14 +190,15 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
190 | { | 190 | { |
191 | //m_log.DebugFormat("[WORLD MAP]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps); | 191 | //m_log.DebugFormat("[WORLD MAP]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps); |
192 | string capsBase = "/CAPS/" + caps.CapsObjectPath; | 192 | string capsBase = "/CAPS/" + caps.CapsObjectPath; |
193 | caps.RegisterHandler("MapLayer", | 193 | caps.RegisterHandler( |
194 | new RestStreamHandler("POST", capsBase + m_mapLayerPath, | 194 | "MapLayer", |
195 | delegate(string request, string path, string param, | 195 | new RestStreamHandler( |
196 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 196 | "POST", |
197 | { | 197 | capsBase + m_mapLayerPath, |
198 | return MapLayerRequest(request, path, param, | 198 | (request, path, param, httpRequest, httpResponse) |
199 | agentID, caps); | 199 | => MapLayerRequest(request, path, param, agentID, caps), |
200 | })); | 200 | "MapLayer", |
201 | agentID.ToString())); | ||
201 | } | 202 | } |
202 | 203 | ||
203 | /// <summary> | 204 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs index 6c5685c..1365831 100644 --- a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs +++ b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs | |||
@@ -48,16 +48,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
48 | { | 48 | { |
49 | public class RegionStatsHandler : IStreamedRequestHandler | 49 | public class RegionStatsHandler : IStreamedRequestHandler |
50 | { | 50 | { |
51 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
52 | |||
51 | private string osRXStatsURI = String.Empty; | 53 | private string osRXStatsURI = String.Empty; |
52 | private string osXStatsURI = String.Empty; | 54 | private string osXStatsURI = String.Empty; |
53 | //private string osSecret = String.Empty; | 55 | //private string osSecret = String.Empty; |
54 | private OpenSim.Framework.RegionInfo regionInfo; | 56 | private OpenSim.Framework.RegionInfo regionInfo; |
55 | public string localZone = TimeZone.CurrentTimeZone.StandardName; | 57 | public string localZone = TimeZone.CurrentTimeZone.StandardName; |
56 | public TimeSpan utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now); | 58 | public TimeSpan utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now); |
57 | |||
58 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
59 | 59 | ||
60 | public RegionStatsHandler(OpenSim.Framework.RegionInfo region_info) | 60 | public string Name { get { return "RegionStats"; } } |
61 | public string Description { get { return "Region Statistics"; } } | ||
62 | |||
63 | public RegionStatsHandler(RegionInfo region_info) | ||
61 | { | 64 | { |
62 | regionInfo = region_info; | 65 | regionInfo = region_info; |
63 | osRXStatsURI = Util.SHA1Hash(regionInfo.regionSecret); | 66 | osRXStatsURI = Util.SHA1Hash(regionInfo.regionSecret); |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index 05678c0..be8873d 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | |||
@@ -306,30 +306,35 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
306 | agentID, caps, scene.RegionInfo.RegionName); | 306 | agentID, caps, scene.RegionInfo.RegionName); |
307 | 307 | ||
308 | string capsBase = "/CAPS/" + caps.CapsObjectPath; | 308 | string capsBase = "/CAPS/" + caps.CapsObjectPath; |
309 | caps.RegisterHandler("ProvisionVoiceAccountRequest", | 309 | caps.RegisterHandler( |
310 | new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath, | 310 | "ProvisionVoiceAccountRequest", |
311 | delegate(string request, string path, string param, | 311 | new RestStreamHandler( |
312 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 312 | "POST", |
313 | { | 313 | capsBase + m_provisionVoiceAccountRequestPath, |
314 | return ProvisionVoiceAccountRequest(scene, request, path, param, | 314 | (request, path, param, httpRequest, httpResponse) |
315 | agentID, caps); | 315 | => ProvisionVoiceAccountRequest(scene, request, path, param, agentID, caps), |
316 | })); | 316 | "ProvisionVoiceAccountRequest", |
317 | caps.RegisterHandler("ParcelVoiceInfoRequest", | 317 | agentID.ToString())); |
318 | new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath, | 318 | |
319 | delegate(string request, string path, string param, | 319 | caps.RegisterHandler( |
320 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 320 | "ParcelVoiceInfoRequest", |
321 | { | 321 | new RestStreamHandler( |
322 | return ParcelVoiceInfoRequest(scene, request, path, param, | 322 | "POST", |
323 | agentID, caps); | 323 | capsBase + m_parcelVoiceInfoRequestPath, |
324 | })); | 324 | (request, path, param, httpRequest, httpResponse) |
325 | caps.RegisterHandler("ChatSessionRequest", | 325 | => ParcelVoiceInfoRequest(scene, request, path, param, agentID, caps), |
326 | new RestStreamHandler("POST", capsBase + m_chatSessionRequestPath, | 326 | "ParcelVoiceInfoRequest", |
327 | delegate(string request, string path, string param, | 327 | agentID.ToString())); |
328 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 328 | |
329 | { | 329 | caps.RegisterHandler( |
330 | return ChatSessionRequest(scene, request, path, param, | 330 | "ChatSessionRequest", |
331 | agentID, caps); | 331 | new RestStreamHandler( |
332 | })); | 332 | "POST", |
333 | capsBase + m_chatSessionRequestPath, | ||
334 | (request, path, param, httpRequest, httpResponse) | ||
335 | => ChatSessionRequest(scene, request, path, param, agentID, caps), | ||
336 | "ChatSessionRequest", | ||
337 | agentID.ToString())); | ||
333 | } | 338 | } |
334 | 339 | ||
335 | /// <summary> | 340 | /// <summary> |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index 738133c..a36fd74 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | |||
@@ -406,30 +406,36 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
406 | m_log.DebugFormat("[VivoxVoice] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); | 406 | m_log.DebugFormat("[VivoxVoice] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); |
407 | 407 | ||
408 | string capsBase = "/CAPS/" + caps.CapsObjectPath; | 408 | string capsBase = "/CAPS/" + caps.CapsObjectPath; |
409 | caps.RegisterHandler("ProvisionVoiceAccountRequest", | 409 | |
410 | new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath, | 410 | caps.RegisterHandler( |
411 | delegate(string request, string path, string param, | 411 | "ProvisionVoiceAccountRequest", |
412 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 412 | new RestStreamHandler( |
413 | { | 413 | "POST", |
414 | return ProvisionVoiceAccountRequest(scene, request, path, param, | 414 | capsBase + m_provisionVoiceAccountRequestPath, |
415 | agentID, caps); | 415 | (request, path, param, httpRequest, httpResponse) |
416 | })); | 416 | => ProvisionVoiceAccountRequest(scene, request, path, param, agentID, caps), |
417 | caps.RegisterHandler("ParcelVoiceInfoRequest", | 417 | "ProvisionVoiceAccountRequest", |
418 | new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath, | 418 | agentID.ToString())); |
419 | delegate(string request, string path, string param, | 419 | |
420 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 420 | caps.RegisterHandler( |
421 | { | 421 | "ParcelVoiceInfoRequest", |
422 | return ParcelVoiceInfoRequest(scene, request, path, param, | 422 | new RestStreamHandler( |
423 | agentID, caps); | 423 | "POST", |
424 | })); | 424 | capsBase + m_parcelVoiceInfoRequestPath, |
425 | caps.RegisterHandler("ChatSessionRequest", | 425 | (request, path, param, httpRequest, httpResponse) |
426 | new RestStreamHandler("POST", capsBase + m_chatSessionRequestPath, | 426 | => ParcelVoiceInfoRequest(scene, request, path, param, agentID, caps), |
427 | delegate(string request, string path, string param, | 427 | "ParcelVoiceInfoRequest", |
428 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 428 | agentID.ToString())); |
429 | { | 429 | |
430 | return ChatSessionRequest(scene, request, path, param, | 430 | caps.RegisterHandler( |
431 | agentID, caps); | 431 | "ChatSessionRequest", |
432 | })); | 432 | new RestStreamHandler( |
433 | "POST", | ||
434 | capsBase + m_chatSessionRequestPath, | ||
435 | (request, path, param, httpRequest, httpResponse) | ||
436 | => ChatSessionRequest(scene, request, path, param, agentID, caps), | ||
437 | "ChatSessionRequest", | ||
438 | agentID.ToString())); | ||
433 | } | 439 | } |
434 | 440 | ||
435 | /// <summary> | 441 | /// <summary> |
diff --git a/OpenSim/Region/UserStatistics/WebStatsModule.cs b/OpenSim/Region/UserStatistics/WebStatsModule.cs index 4248035..faf746f 100644 --- a/OpenSim/Region/UserStatistics/WebStatsModule.cs +++ b/OpenSim/Region/UserStatistics/WebStatsModule.cs | |||
@@ -282,14 +282,15 @@ namespace OpenSim.Region.UserStatistics | |||
282 | // m_log.DebugFormat("[WEB STATS MODULE]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps); | 282 | // m_log.DebugFormat("[WEB STATS MODULE]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps); |
283 | 283 | ||
284 | string capsPath = "/CAPS/VS/" + UUID.Random(); | 284 | string capsPath = "/CAPS/VS/" + UUID.Random(); |
285 | caps.RegisterHandler("ViewerStats", | 285 | caps.RegisterHandler( |
286 | new RestStreamHandler("POST", capsPath, | 286 | "ViewerStats", |
287 | delegate(string request, string path, string param, | 287 | new RestStreamHandler( |
288 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 288 | "POST", |
289 | { | 289 | capsPath, |
290 | return ViewerStatsReport(request, path, param, | 290 | (request, path, param, httpRequest, httpResponse) |
291 | agentID, caps); | 291 | => ViewerStatsReport(request, path, param, agentID, caps), |
292 | })); | 292 | "ViewerStats", |
293 | agentID.ToString())); | ||
293 | } | 294 | } |
294 | 295 | ||
295 | private void OnDeRegisterCaps(UUID agentID, Caps caps) | 296 | private void OnDeRegisterCaps(UUID agentID, Caps caps) |