]> git.notmuchmail.org Git - notmuch/commitdiff
lib: remove use of notmuch_query_search_messages from query.cc
authorDavid Bremner <david@tethera.net>
Sun, 7 Jun 2015 15:01:57 +0000 (17:01 +0200)
committerDavid Bremner <david@tethera.net>
Fri, 4 Sep 2015 11:06:08 +0000 (08:06 -0300)
There is not too much point in worrying about the bad error reporting
here, because the count api is due for the same deprecation.

lib/query.cc

index 5275b5a24fe620ed2dcef5fd2d87a9b78a1860a6..f53215dbaf5902fca51d3c7dd5ac3628802ded00 100644 (file)
@@ -618,10 +618,14 @@ notmuch_query_count_threads (notmuch_query_t *query)
     GHashTable *hash;
     unsigned int count;
     notmuch_sort_t sort;
+    notmuch_status_t status;
 
     sort = query->sort;
     query->sort = NOTMUCH_SORT_UNSORTED;
-    messages = notmuch_query_search_messages (query);
+    status = notmuch_query_search_messages_st (query, &messages);
+    if (status)
+       return 0;
+
     query->sort = sort;
     if (messages == NULL)
        return 0;