X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fmessage-file.c;fp=lib%2Fmessage-file.c;h=8ac96e8e06a5dd9a132f241469690c773777fdb4;hp=a41d9ad2a719df507d3091316d594bc38b3e4fc5;hb=9d192da683b0656e37fc8d69c69698ca605926b3;hpb=736ac26407914425a9c94e86616225292cf716dd diff --git a/lib/message-file.c b/lib/message-file.c index a41d9ad2..8ac96e8e 100644 --- a/lib/message-file.c +++ b/lib/message-file.c @@ -76,7 +76,8 @@ _notmuch_message_file_destructor (notmuch_message_file_t *message) /* Create a new notmuch_message_file_t for 'filename' with 'ctx' as * the talloc owner. */ notmuch_message_file_t * -_notmuch_message_file_open_ctx (void *ctx, const char *filename) +_notmuch_message_file_open_ctx (notmuch_database_t *notmuch, + void *ctx, const char *filename) { notmuch_message_file_t *message; @@ -98,16 +99,18 @@ _notmuch_message_file_open_ctx (void *ctx, const char *filename) return message; FAIL: - fprintf (stderr, "Error opening %s: %s\n", filename, strerror (errno)); + _notmuch_database_log (notmuch, "Error opening %s: %s\n", + filename, strerror (errno)); _notmuch_message_file_close (message); return NULL; } notmuch_message_file_t * -_notmuch_message_file_open (const char *filename) +_notmuch_message_file_open (notmuch_database_t *notmuch, + const char *filename) { - return _notmuch_message_file_open_ctx (NULL, filename); + return _notmuch_message_file_open_ctx (notmuch, NULL, filename); } void