diff options
author | Melanie | 2013-04-30 23:35:59 +0200 |
---|---|---|
committer | Melanie | 2013-04-30 23:50:23 +0100 |
commit | ac135c649c55fefc73e2f5f654a5ff65f45d50c0 (patch) | |
tree | 522130f0a6df75c1b48d156db78ea8cc0af10386 /OpenSim/Region/ClientStack | |
parent | BulletSim: fix error messages created while an avatar has no initial (diff) | |
download | opensim-SC_OLD-ac135c649c55fefc73e2f5f654a5ff65f45d50c0.zip opensim-SC_OLD-ac135c649c55fefc73e2f5f654a5ff65f45d50c0.tar.gz opensim-SC_OLD-ac135c649c55fefc73e2f5f654a5ff65f45d50c0.tar.bz2 opensim-SC_OLD-ac135c649c55fefc73e2f5f654a5ff65f45d50c0.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')
-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 8752404..a46c24a 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -273,11 +273,22 @@ namespace OpenSim.Region.ClientStack.Linden | |||
273 | return string.Empty; | 273 | return string.Empty; |
274 | } | 274 | } |
275 | 275 | ||
276 | Hashtable caps = m_HostCapsObj.CapsHandlers.GetCapsDetails(true); | 276 | OSDArray capsRequested = (OSDArray)OSDParser.DeserializeLLSDXml(request); |
277 | List<string> validCaps = new List<string>(); | ||
278 | |||
279 | foreach (OSD c in capsRequested) | ||
280 | validCaps.Add(c.AsString()); | ||
281 | |||
282 | Hashtable caps = m_HostCapsObj.CapsHandlers.GetCapsDetails(true, validCaps); | ||
277 | 283 | ||
278 | // Add the external too | 284 | // Add the external too |
279 | foreach (KeyValuePair<string, string> kvp in m_HostCapsObj.ExternalCapsHandlers) | 285 | foreach (KeyValuePair<string, string> kvp in m_HostCapsObj.ExternalCapsHandlers) |
286 | { | ||
287 | if (!validCaps.Contains(kvp.Key)) | ||
288 | continue; | ||
289 | |||
280 | caps[kvp.Key] = kvp.Value; | 290 | caps[kvp.Key] = kvp.Value; |
291 | } | ||
281 | 292 | ||
282 | string result = LLSDHelpers.SerialiseLLSDReply(caps); | 293 | string result = LLSDHelpers.SerialiseLLSDReply(caps); |
283 | 294 | ||