diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
3 files changed, 33 insertions, 48 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 5c6bc1c..1d4c7f0 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -285,18 +285,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
285 | foreach (OSD c in capsRequested) | 285 | foreach (OSD c in capsRequested) |
286 | validCaps.Add(c.AsString()); | 286 | validCaps.Add(c.AsString()); |
287 | 287 | ||
288 | Hashtable caps = m_HostCapsObj.CapsHandlers.GetCapsDetails(true, validCaps); | 288 | string result = LLSDHelpers.SerialiseLLSDReply(m_HostCapsObj.GetCapsDetails(true, validCaps)); |
289 | |||
290 | // Add the external too | ||
291 | foreach (KeyValuePair<string, string> kvp in m_HostCapsObj.ExternalCapsHandlers) | ||
292 | { | ||
293 | if (!validCaps.Contains(kvp.Key)) | ||
294 | continue; | ||
295 | |||
296 | caps[kvp.Key] = kvp.Value; | ||
297 | } | ||
298 | |||
299 | string result = LLSDHelpers.SerialiseLLSDReply(caps); | ||
300 | 289 | ||
301 | //m_log.DebugFormat("[CAPS] CapsRequest {0}", result); | 290 | //m_log.DebugFormat("[CAPS] CapsRequest {0}", result); |
302 | 291 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 50bfda1..ca38a97 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | |||
@@ -377,7 +377,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
377 | // TODO: Add EventQueueGet name/description for diagnostics | 377 | // TODO: Add EventQueueGet name/description for diagnostics |
378 | MainServer.Instance.AddPollServiceHTTPHandler( | 378 | MainServer.Instance.AddPollServiceHTTPHandler( |
379 | eventQueueGetPath, | 379 | eventQueueGetPath, |
380 | new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID, 40000)); | 380 | new PollServiceEventArgs(null, eventQueueGetPath, HasEvents, GetEvents, NoEvents, agentID, 40000)); |
381 | 381 | ||
382 | // m_log.DebugFormat( | 382 | // m_log.DebugFormat( |
383 | // "[EVENT QUEUE GET MODULE]: Registered EQG handler {0} for {1} in {2}", | 383 | // "[EVENT QUEUE GET MODULE]: Registered EQG handler {0} for {1} in {2}", |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index b90df17..86a0298 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs | |||
@@ -77,7 +77,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
77 | 77 | ||
78 | private static WebFetchInvDescHandler m_webFetchHandler; | 78 | private static WebFetchInvDescHandler m_webFetchHandler; |
79 | 79 | ||
80 | private Dictionary<UUID, string> m_capsDict = new Dictionary<UUID, string>(); | ||
81 | private static Thread[] m_workerThreads = null; | 80 | private static Thread[] m_workerThreads = null; |
82 | 81 | ||
83 | private static DoubleQueue<aPollRequest> m_queue = | 82 | private static DoubleQueue<aPollRequest> m_queue = |
@@ -114,7 +113,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
114 | return; | 113 | return; |
115 | 114 | ||
116 | m_scene.EventManager.OnRegisterCaps -= RegisterCaps; | 115 | m_scene.EventManager.OnRegisterCaps -= RegisterCaps; |
117 | m_scene.EventManager.OnDeregisterCaps -= DeregisterCaps; | ||
118 | 116 | ||
119 | foreach (Thread t in m_workerThreads) | 117 | foreach (Thread t in m_workerThreads) |
120 | Watchdog.AbortThread(t.ManagedThreadId); | 118 | Watchdog.AbortThread(t.ManagedThreadId); |
@@ -134,7 +132,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
134 | m_webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService); | 132 | m_webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService); |
135 | 133 | ||
136 | m_scene.EventManager.OnRegisterCaps += RegisterCaps; | 134 | m_scene.EventManager.OnRegisterCaps += RegisterCaps; |
137 | m_scene.EventManager.OnDeregisterCaps += DeregisterCaps; | ||
138 | 135 | ||
139 | if (m_workerThreads == null) | 136 | if (m_workerThreads == null) |
140 | { | 137 | { |
@@ -177,8 +174,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
177 | 174 | ||
178 | private Scene m_scene; | 175 | private Scene m_scene; |
179 | 176 | ||
180 | public PollServiceInventoryEventArgs(Scene scene, UUID pId) : | 177 | public PollServiceInventoryEventArgs(Scene scene, string url, UUID pId) : |
181 | base(null, null, null, null, pId, int.MaxValue) | 178 | base(null, url, null, null, null, pId, int.MaxValue) |
182 | { | 179 | { |
183 | m_scene = scene; | 180 | m_scene = scene; |
184 | 181 | ||
@@ -308,40 +305,39 @@ namespace OpenSim.Region.ClientStack.Linden | |||
308 | if (m_fetchInventoryDescendents2Url == "") | 305 | if (m_fetchInventoryDescendents2Url == "") |
309 | return; | 306 | return; |
310 | 307 | ||
311 | string capUrl = "/CAPS/" + UUID.Random() + "/"; | ||
312 | |||
313 | // Register this as a poll service | 308 | // Register this as a poll service |
314 | PollServiceInventoryEventArgs args = new PollServiceInventoryEventArgs(m_scene, agentID); | 309 | PollServiceInventoryEventArgs args |
315 | 310 | = new PollServiceInventoryEventArgs(m_scene, "/CAPS/" + UUID.Random() + "/", agentID); | |
316 | args.Type = PollServiceEventArgs.EventType.Inventory; | 311 | args.Type = PollServiceEventArgs.EventType.Inventory; |
317 | MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); | ||
318 | |||
319 | string hostName = m_scene.RegionInfo.ExternalHostName; | ||
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 | 312 | ||
332 | m_capsDict[agentID] = capUrl; | 313 | caps.RegisterPollHandler("FetchInventoryDescendents2", args); |
314 | |||
315 | // MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); | ||
316 | // | ||
317 | // string hostName = m_scene.RegionInfo.ExternalHostName; | ||
318 | // uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port; | ||
319 | // string protocol = "http"; | ||
320 | // | ||
321 | // if (MainServer.Instance.UseSSL) | ||
322 | // { | ||
323 | // hostName = MainServer.Instance.SSLCommonName; | ||
324 | // port = MainServer.Instance.SSLPort; | ||
325 | // protocol = "https"; | ||
326 | // } | ||
327 | // | ||
328 | // caps.RegisterHandler("FetchInventoryDescendents2", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl)); | ||
333 | } | 329 | } |
334 | 330 | ||
335 | private void DeregisterCaps(UUID agentID, Caps caps) | 331 | // private void DeregisterCaps(UUID agentID, Caps caps) |
336 | { | 332 | // { |
337 | string capUrl; | 333 | // string capUrl; |
338 | 334 | // | |
339 | if (m_capsDict.TryGetValue(agentID, out capUrl)) | 335 | // if (m_capsDict.TryGetValue(agentID, out capUrl)) |
340 | { | 336 | // { |
341 | MainServer.Instance.RemoveHTTPHandler("", capUrl); | 337 | // MainServer.Instance.RemoveHTTPHandler("", capUrl); |
342 | m_capsDict.Remove(agentID); | 338 | // m_capsDict.Remove(agentID); |
343 | } | 339 | // } |
344 | } | 340 | // } |
345 | 341 | ||
346 | private void DoInventoryRequests() | 342 | private void DoInventoryRequests() |
347 | { | 343 | { |
@@ -355,4 +351,4 @@ namespace OpenSim.Region.ClientStack.Linden | |||
355 | } | 351 | } |
356 | } | 352 | } |
357 | } | 353 | } |
358 | } | 354 | } \ No newline at end of file |