[rygel] tracker: Correct search (for @id) logic
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rygel] tracker: Correct search (for @id) logic
- Date: Sat, 5 Dec 2009 01:21:34 +0000 (UTC)
commit e91772b6ecf59ffffce8741dfd5116b2944ed151
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Dec 2 16:31:48 2009 +0200
tracker: Correct search (for @id) logic
If a child item is being search for, the sparql query generated for it
must contain a filter to make the query specific for the requested item.
.../tracker/rygel-tracker-search-container.vala | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-search-container.vala b/src/plugins/tracker/rygel-tracker-search-container.vala
index 57cac9c..fd7b9b0 100644
--- a/src/plugins/tracker/rygel-tracker-search-container.vala
+++ b/src/plugins/tracker/rygel-tracker-search-container.vala
@@ -186,20 +186,20 @@ public class Rygel.TrackerSearchContainer : Rygel.MediaContainer {
}
var rel_expression = expression as RelationalExpression;
- string filter = null;
+ var query = new TrackerQuery.clone (this.query);
if (rel_expression.operand1 == "@id") {
- filter = create_filter_for_id (rel_expression);
+ var filter = create_filter_for_id (rel_expression);
+ if (filter != null) {
+ query.filters.add (filter);
+ } else {
+ return null;
+ }
} else if (rel_expression.operand1 == "@parentID" &&
!rel_expression.compare_string (this.id)) {
return null;
}
- var query = new TrackerQuery.clone (this.query);
- if (filter != null) {
- query.filters.add (filter);
- }
-
query.offset = offset;
query.max_count = max_count;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]