#include <sys/time.h>
#include <signal.h>
-#include <xapian.h>
#include <glib.h> /* g_free, GPtrArray, GHashTable */
DONE:
if (message) {
- if (ret == NOTMUCH_STATUS_SUCCESS && message_ret)
+ if ((ret == NOTMUCH_STATUS_SUCCESS ||
+ ret == NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID) && message_ret)
*message_ret = message;
else
notmuch_message_destroy (message);
if (status)
return status;
- term = talloc_asprintf (notmuch, "%s%s", prefix, direntry);
+ term = talloc_asprintf (local, "%s%s", prefix, direntry);
find_doc_ids_for_term (notmuch, term, &i, &end);