[rygel] tracker: Correct checks for limit and offset



commit 1f31e845f3f1abd8d05ad5c6e29fb36a16e3b488
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Aug 20 19:14:23 2010 +0300

    tracker: Correct checks for limit and offset

 .../tracker/rygel-tracker-selection-query.vala     |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-selection-query.vala b/src/plugins/tracker/rygel-tracker-selection-query.vala
index e459bb2..d27fcf8 100644
--- a/src/plugins/tracker/rygel-tracker-selection-query.vala
+++ b/src/plugins/tracker/rygel-tracker-selection-query.vala
@@ -100,9 +100,11 @@ public class Rygel.Tracker.SelectionQuery : Query {
             query += " ORDER BY " + order_by;
         }
 
-        query += " OFFSET " + this.offset.to_string ();
+        if (this.offset > 0) {
+            query += " OFFSET " + this.offset.to_string ();
+        }
 
-        if (this.max_count != -1) {
+        if (this.max_count > 0) {
             query += " LIMIT " + this.max_count.to_string ();
         }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]