[rygel] core: Correctly handle top-level attributes
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel] core: Correctly handle top-level attributes
- Date: Wed, 24 Jun 2009 11:46:40 +0000 (UTC)
commit 74320952e92af233dd2f050304c91c0a0a9d2086
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Jun 24 14:25:19 2009 +0300
core: Correctly handle top-level attributes
src/rygel/rygel-browse-filter.vala | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-browse-filter.vala b/src/rygel/rygel-browse-filter.vala
index 281978b..3841169 100644
--- a/src/rygel/rygel-browse-filter.vala
+++ b/src/rygel/rygel-browse-filter.vala
@@ -87,7 +87,10 @@ internal class Rygel.BrowseFilter : ArrayList<string> {
}
private static bool filter_equal_func (string a, string b) {
- return a == "*" || a == b || a.has_prefix (b + "@");
+ return a == "*" || // Wildcard
+ a == b || // Exact match
+ a == "@" + b || // top-level attribute, e.g @childCount
+ a.has_prefix (b + "@"); // Attribute implies containing element
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]