diff options
author | Melanie | 2013-04-30 23:35:59 +0200 |
---|---|---|
committer | Melanie | 2013-04-30 23:35:59 +0200 |
commit | 0af1d8fe196e403c066f7fc3dbc9f4b897b4da2c (patch) | |
tree | 85470dbf911738d3e52c07a84e4f197947096cac /OpenSim/Region/ClientStack/Linden/Caps | |
parent | Merge branch 'ubitwork' into avination-current (diff) | |
download | opensim-SC-0af1d8fe196e403c066f7fc3dbc9f4b897b4da2c.zip opensim-SC-0af1d8fe196e403c066f7fc3dbc9f4b897b4da2c.tar.gz opensim-SC-0af1d8fe196e403c066f7fc3dbc9f4b897b4da2c.tar.bz2 opensim-SC-0af1d8fe196e403c066f7fc3dbc9f4b897b4da2c.tar.xz |
Fix CAPS to work like they should - do not send caps to the viewer if they're not in the requested caps list.
The previous wrong behavior caused the debug setting "UseHTTPInventory" to fail
on all viewers when turned off. UDB inventory would not be correctly used in
that case.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 921d3bf..59b9585 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -355,11 +355,22 @@ namespace OpenSim.Region.ClientStack.Linden | |||
355 | return string.Empty; | 355 | return string.Empty; |
356 | } | 356 | } |
357 | 357 | ||
358 | Hashtable caps = m_HostCapsObj.CapsHandlers.GetCapsDetails(true); | 358 | OSDArray capsRequested = (OSDArray)OSDParser.DeserializeLLSDXml(request); |
359 | List<string> validCaps = new List<string>(); | ||
360 | |||
361 | foreach (OSD c in capsRequested) | ||
362 | validCaps.Add(c.AsString()); | ||
363 | |||
364 | Hashtable caps = m_HostCapsObj.CapsHandlers.GetCapsDetails(true, validCaps); | ||
359 | 365 | ||
360 | // Add the external too | 366 | // Add the external too |
361 | foreach (KeyValuePair<string, string> kvp in m_HostCapsObj.ExternalCapsHandlers) | 367 | foreach (KeyValuePair<string, string> kvp in m_HostCapsObj.ExternalCapsHandlers) |
368 | { | ||
369 | if (!validCaps.Contains(kvp.Key)) | ||
370 | continue; | ||
371 | |||
362 | caps[kvp.Key] = kvp.Value; | 372 | caps[kvp.Key] = kvp.Value; |
373 | } | ||
363 | 374 | ||
364 | string result = LLSDHelpers.SerialiseLLSDReply(caps); | 375 | string result = LLSDHelpers.SerialiseLLSDReply(caps); |
365 | 376 | ||