X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fdatabase.cc;h=3c8d626e93d66aeabc2715a4889aacfe7bffd88a;hp=6b7ad49d7eb1fc369d8afaaf66f6896407fa9dd5;hb=12d3014d88737745d2b63d17b8b90f7553a242e1;hpb=305e76bc0ab2e7f3bd1ff2580e8d5dac8b4a7164 diff --git a/lib/database.cc b/lib/database.cc index 6b7ad49d..3c8d626e 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -107,7 +107,6 @@ prefix_t BOOLEAN_PREFIX_INTERNAL[] = { { "ref", "XREFERENCE" }, { "replyto", "XREPLYTO" }, { "timestamp", "XTIMESTAMP" }, - { "contact", "XCONTACT" } }; prefix_t BOOLEAN_PREFIX_EXTERNAL[] = { @@ -313,8 +312,8 @@ skip_space_and_comments (const char **str) * Returns a newly talloc'ed string belonging to 'ctx'. * * Returns NULL if there is any error parsing the message-id. */ -static char * -parse_message_id (void *ctx, const char *message_id, const char **next) +char * +_parse_message_id (void *ctx, const char *message_id, const char **next) { const char *s, *end; char *result; @@ -384,7 +383,7 @@ parse_references (void *ctx, return; while (*refs) { - ref = parse_message_id (ctx, refs, &refs); + ref = _parse_message_id (ctx, refs, &refs); if (ref) g_hash_table_insert (hash, ref, NULL); @@ -711,7 +710,7 @@ _notmuch_database_link_message_to_parents (notmuch_database_t *notmuch, in_reply_to = notmuch_message_file_get_header (message_file, "in-reply-to"); parse_references (message, parents, in_reply_to); _notmuch_message_add_term (message, "replyto", - parse_message_id (message, in_reply_to, NULL)); + _parse_message_id (message, in_reply_to, NULL)); keys = g_hash_table_get_keys (parents); for (l = keys; l; l = l->next) { @@ -797,7 +796,7 @@ _notmuch_database_link_message_to_children (notmuch_database_t *notmuch, /* Given a (mostly empty) 'message' and its corresponding * 'message_file' link it to existing threads in the database. * - * We first looke at 'message_file' and its link-relevant headers + * We first look at 'message_file' and its link-relevant headers * (References and In-Reply-To) for message IDs. We also look in the * database for existing message that reference 'message'.p * @@ -887,7 +886,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch, header = notmuch_message_file_get_header (message_file, "message-id"); if (header) { - message_id = parse_message_id (message_file, header, NULL); + message_id = _parse_message_id (message_file, header, NULL); /* So the header value isn't RFC-compliant, but it's * better than no message-id at all. */ if (message_id == NULL) @@ -912,8 +911,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch, * (which may or may not reference an existing document in the * database). */ - /* Use NULL for owner since we want to free this locally. */ - message = _notmuch_message_create_for_message_id (NULL, + message = _notmuch_message_create_for_message_id (notmuch, notmuch, message_id, &private_status);