From: Martti Rannanjärvi Date: Mon, 13 Feb 2017 07:09:28 +0000 (+0200) Subject: lib-index: clear file->mmap_size only after logging it X-Git-Tag: 2.3.0.rc1~2134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e90ca575864d29d0ded6ea71cd9747aab0a38f4;p=thirdparty%2Fdovecot%2Fcore.git lib-index: clear file->mmap_size only after logging it Logging the error with size=0 loses information. --- diff --git a/src/lib-index/mail-transaction-log-file.c b/src/lib-index/mail-transaction-log-file.c index ad41903b35..c71366995e 100644 --- a/src/lib-index/mail-transaction-log-file.c +++ b/src/lib-index/mail-transaction-log-file.c @@ -1635,12 +1635,12 @@ mail_transaction_log_file_mmap(struct mail_transaction_log_file *file) file->fd, 0); if (file->mmap_base == MAP_FAILED) { file->mmap_base = NULL; - file->mmap_size = 0; if (ioloop_time != file->last_mmap_error_time) { file->last_mmap_error_time = ioloop_time; log_file_set_syscall_error(file, t_strdup_printf( "mmap(size=%"PRIuSIZE_T")", file->mmap_size)); } + file->mmap_size = 0; return -1; }