]> arthur.barton.de Git - netatalk.git/commitdiff
Spotlight: when to call tracker_sparql_cursor_next_async()
authorRalph Boehme <rb@sernet.de>
Sat, 9 Aug 2014 06:26:15 +0000 (08:26 +0200)
committerRalph Boehme <rb@sernet.de>
Sat, 9 Aug 2014 06:26:15 +0000 (08:26 +0200)
No need to call tracker_sparql_cursor_next_async() if the queue is in
SLQ_STATE_RESULTS state, as then the cursor callback will already have
called it in order to request more results.

Signed-off-by: Ralph Boehme <rb@sernet.de>
etc/afpd/spotlight.c

index 994438d900fc5d5e097eaf70f8cd7d0e099d7402..f62ac6dd8aecb18411150df705206eff94d862ea 100644 (file)
@@ -965,8 +965,7 @@ static int sl_rpc_fetchQueryResultsForContext(const AFPObj *obj,
             LOG(log_error, logtype_sl, "error adding results");
             EC_FAIL;
         }
-        if (slq->slq_state == SLQ_STATE_RESULTS
-            || slq->slq_state == SLQ_STATE_FULL) {
+        if (slq->slq_state == SLQ_STATE_FULL) {
             slq->slq_state = SLQ_STATE_RESULTS;
 
             tracker_sparql_cursor_next_async(