X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=lib%2Fdatabase.cc;h=eddb780c69ebc76ab8870fb93dfb23d01e1a6176;hb=4e649d000b9d3764aea98cb0e1120947d7f76f3d;hp=4bfae0197cf9020089640294faad00b64885f468;hpb=1c3a8e0898be614b5183f0ae626386f7746e7e07;p=notmuch diff --git a/lib/database.cc b/lib/database.cc index 4bfae019..eddb780c 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -652,7 +652,7 @@ parse_references (void *ctx, ref = _parse_message_id (ctx, refs, &refs); if (ref && strcmp (ref, message_id)) { - g_hash_table_insert (hash, ref, NULL); + g_hash_table_add (hash, ref); last_ref = ref; } } @@ -661,7 +661,7 @@ parse_references (void *ctx, * reference to the database. We should avoid making a message * its own parent, thus the above check. */ - return last_ref; + return talloc_strdup(ctx, last_ref); } notmuch_status_t @@ -1143,7 +1143,6 @@ notmuch_database_close (notmuch_database_t *notmuch) return status; } -#if HAVE_XAPIAN_COMPACT static int unlink_cb (const char *path, unused (const struct stat *sb), @@ -1327,17 +1326,6 @@ notmuch_database_compact (const char *path, return ret; } -#else -notmuch_status_t -notmuch_database_compact (unused (const char *path), - unused (const char *backup_path), - unused (notmuch_compact_status_cb_t status_cb), - unused (void *closure)) -{ - _notmuch_database_log (notmuch, "notmuch was compiled against a xapian version lacking compaction support.\n"); - return NOTMUCH_STATUS_UNSUPPORTED_OPERATION; -} -#endif notmuch_status_t notmuch_database_destroy (notmuch_database_t *notmuch)