diff options
Diffstat (limited to 'OpenSim')
3 files changed, 18 insertions, 4 deletions
diff --git a/OpenSim/Capabilities/CapsHandlers.cs b/OpenSim/Capabilities/CapsHandlers.cs index 1709f46..458272d 100644 --- a/OpenSim/Capabilities/CapsHandlers.cs +++ b/OpenSim/Capabilities/CapsHandlers.cs | |||
@@ -158,7 +158,7 @@ namespace OpenSim.Framework.Capabilities | |||
158 | /// capabilities and their handler details. | 158 | /// capabilities and their handler details. |
159 | /// </summary> | 159 | /// </summary> |
160 | /// <param name="excludeSeed">If true, then exclude the seed cap.</param> | 160 | /// <param name="excludeSeed">If true, then exclude the seed cap.</param> |
161 | public Hashtable GetCapsDetails(bool excludeSeed) | 161 | public Hashtable GetCapsDetails(bool excludeSeed, List<string> requestedCaps) |
162 | { | 162 | { |
163 | Hashtable caps = new Hashtable(); | 163 | Hashtable caps = new Hashtable(); |
164 | string protocol = "http://"; | 164 | string protocol = "http://"; |
@@ -175,6 +175,9 @@ namespace OpenSim.Framework.Capabilities | |||
175 | if (excludeSeed && "SEED" == capsName) | 175 | if (excludeSeed && "SEED" == capsName) |
176 | continue; | 176 | continue; |
177 | 177 | ||
178 | if (requestedCaps != null && !requestedCaps.Contains(capsName)) | ||
179 | continue; | ||
180 | |||
178 | caps[capsName] = baseUrl + m_capsHandlers[capsName].Path; | 181 | caps[capsName] = baseUrl + m_capsHandlers[capsName].Path; |
179 | } | 182 | } |
180 | } | 183 | } |
@@ -182,4 +185,4 @@ namespace OpenSim.Framework.Capabilities | |||
182 | return caps; | 185 | return caps; |
183 | } | 186 | } |
184 | } | 187 | } |
185 | } \ No newline at end of file | 188 | } |
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 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs index 2eb9bfb..fff86d5 100644 --- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs | |||
@@ -252,7 +252,7 @@ namespace OpenSim.Region.CoreModules.Framework | |||
252 | { | 252 | { |
253 | caps.AppendFormat("** Circuit {0}:\n", kvp.Key); | 253 | caps.AppendFormat("** Circuit {0}:\n", kvp.Key); |
254 | 254 | ||
255 | for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.GetCapsDetails(false).GetEnumerator(); kvp2.MoveNext(); ) | 255 | for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.GetCapsDetails(false, null).GetEnumerator(); kvp2.MoveNext(); ) |
256 | { | 256 | { |
257 | Uri uri = new Uri(kvp2.Value.ToString()); | 257 | Uri uri = new Uri(kvp2.Value.ToString()); |
258 | caps.AppendFormat(m_showCapsCommandFormat, kvp2.Key, uri.PathAndQuery); | 258 | caps.AppendFormat(m_showCapsCommandFormat, kvp2.Key, uri.PathAndQuery); |