aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
diff options
context:
space:
mode:
authorMelanie2013-10-04 20:03:12 +0100
committerMelanie2013-10-04 20:03:12 +0100
commit75c68fa29e3a2fed81c883e7925bf161e968639f (patch)
tree13ba69e6818f634018a5954d38750cf48128b7f8 /OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
parentMerge branch 'avination-current' into careminster (diff)
parentminor: Disable logging left active on regression test TestSameSimulatorIsolat... (diff)
downloadopensim-SC-75c68fa29e3a2fed81c883e7925bf161e968639f.zip
opensim-SC-75c68fa29e3a2fed81c883e7925bf161e968639f.tar.gz
opensim-SC-75c68fa29e3a2fed81c883e7925bf161e968639f.tar.bz2
opensim-SC-75c68fa29e3a2fed81c883e7925bf161e968639f.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Data/MySQL/MySQLSimulationData.cs OpenSim/Data/MySQL/Resources/RegionStore.migrations OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs OpenSim/Region/CoreModules/World/LightShare/LightShareModule.cs OpenSim/Region/Framework/Scenes/Scene.cs OpenSim/Region/Framework/Scenes/ScenePresence.cs OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs57
1 files changed, 35 insertions, 22 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
index f816ad3..6fc35cd 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
@@ -116,7 +116,7 @@ namespace OpenSim.Region.ClientStack.Linden
116 m_scene.EventManager.OnRegisterCaps -= RegisterCaps; 116 m_scene.EventManager.OnRegisterCaps -= RegisterCaps;
117 117
118 foreach (Thread t in m_workerThreads) 118 foreach (Thread t in m_workerThreads)
119 Watchdog.AbortThread(t.ManagedThreadId); 119 Watchdog.AbortThread(t.ManagedThreadId);
120 120
121 m_scene = null; 121 m_scene = null;
122 } 122 }
@@ -298,36 +298,49 @@ namespace OpenSim.Region.ClientStack.Linden
298 requestinfo.request["body"].ToString(), String.Empty, String.Empty, null, null); 298 requestinfo.request["body"].ToString(), String.Empty, String.Empty, null, null);
299 299
300 lock (responses) 300 lock (responses)
301 responses[requestID] = response; 301 responses[requestID] = response;
302 } 302 }
303 } 303 }
304 304
305 private void RegisterCaps(UUID agentID, Caps caps) 305 private void RegisterCaps(UUID agentID, Caps caps)
306 { 306 {
307 if (m_fetchInventoryDescendents2Url == "") 307 RegisterFetchDescendentsCap(agentID, caps, "FetchInventoryDescendents2", m_fetchInventoryDescendents2Url);
308 }
309
310 private void RegisterFetchDescendentsCap(UUID agentID, Caps caps, string capName, string url)
311 {
312 string capUrl;
313
314 // disable the cap clause
315 if (url == "")
316 {
308 return; 317 return;
318 }
319 // handled by the simulator
320 else if (url == "localhost")
321 {
322 capUrl = "/CAPS/" + UUID.Random() + "/";
309 323
310 // Register this as a poll service 324 // Register this as a poll service
311 PollServiceInventoryEventArgs args 325 PollServiceInventoryEventArgs args = new PollServiceInventoryEventArgs(m_scene, capUrl, agentID);
312 = new PollServiceInventoryEventArgs(m_scene, "/CAPS/" + UUID.Random() + "/", agentID); 326 args.Type = PollServiceEventArgs.EventType.Inventory;
313 args.Type = PollServiceEventArgs.EventType.Inventory;
314 327
315 caps.RegisterPollHandler("FetchInventoryDescendents2", args); 328 caps.RegisterPollHandler(capName, args);
329 }
330 // external handler
331 else
332 {
333 capUrl = url;
334 IExternalCapsModule handler = m_scene.RequestModuleInterface<IExternalCapsModule>();
335 if (handler != null)
336 handler.RegisterExternalUserCapsHandler(agentID,caps,capName,capUrl);
337 else
338 caps.RegisterHandler(capName, capUrl);
339 }
316 340
317// MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); 341 // m_log.DebugFormat(
318// 342 // "[FETCH INVENTORY DESCENDENTS2 MODULE]: Registered capability {0} at {1} in region {2} for {3}",
319// string hostName = m_scene.RegionInfo.ExternalHostName; 343 // capName, capUrl, m_scene.RegionInfo.RegionName, agentID);
320// uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port;
321// string protocol = "http";
322//
323// if (MainServer.Instance.UseSSL)
324// {
325// hostName = MainServer.Instance.SSLCommonName;
326// port = MainServer.Instance.SSLPort;
327// protocol = "https";
328// }
329//
330// caps.RegisterHandler("FetchInventoryDescendents2", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl));
331 } 344 }
332 345
333// private void DeregisterCaps(UUID agentID, Caps caps) 346// private void DeregisterCaps(UUID agentID, Caps caps)