X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=message.cc;h=28f19a88502dc79ff29210297abfbed4f5ef2562;hb=73ee42be369673d8788f1f8eafdc969d56ce9c4f;hp=154efa0fd47ebde90460ed1516256715b902f723;hpb=fa226a7a10ba95f8d8a7ff92dbfc44f6404d9d4d;p=notmuch diff --git a/message.cc b/message.cc index 154efa0f..28f19a88 100644 --- a/message.cc +++ b/message.cc @@ -259,27 +259,6 @@ notmuch_message_get_header (notmuch_message_t *message, const char *header) return notmuch_message_file_get_header (message->message_file, header); } -const char * -notmuch_message_get_all_headers (notmuch_message_t *message) -{ - _notmuch_message_ensure_message_file (message); - if (message->message_file == NULL) - return NULL; - - return notmuch_message_file_get_all_headers (message->message_file); -} - -size_t -notmuch_message_get_header_size (notmuch_message_t *message) -{ - _notmuch_message_ensure_message_file (message); - if (message->message_file == NULL) - return 0; - - return notmuch_message_file_get_header_size (message->message_file); - -} - const char * notmuch_message_get_thread_id (notmuch_message_t *message) { @@ -430,7 +409,12 @@ _notmuch_message_set_date (notmuch_message_t *message, { time_t time_value; - time_value = g_mime_utils_header_decode_date (date, NULL); + /* GMime really doesn't want to see a NULL date, so protect its + * sensibilities. */ + if (date == NULL) + time_value = 0; + else + time_value = g_mime_utils_header_decode_date (date, NULL); message->doc.add_value (NOTMUCH_VALUE_TIMESTAMP, Xapian::sortable_serialise (time_value));