Skip to content

Commit

Permalink
lib-index: clear file->mmap_size only after logging it
Browse files Browse the repository at this point in the history
Logging the error with size=0 loses information.
  • Loading branch information
mrannanj authored and sirainen committed Feb 17, 2017
1 parent bae12f8 commit 77486ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib-index/mail-transaction-log-file.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 77486ef

Please sign in to comment.