From: Timo Sirainen Date: Tue, 1 Oct 2019 16:07:39 +0000 (+0300) Subject: lib-index: Log all errors with e_error() X-Git-Tag: 2.3.11.2~601 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=220020804dea8533e784a7e866fbb7809bb53c2a;p=thirdparty%2Fdovecot%2Fcore.git lib-index: Log all errors with e_error() --- diff --git a/src/lib-index/mail-cache.c b/src/lib-index/mail-cache.c index 61966a2dce..82f74a8a22 100644 --- a/src/lib-index/mail-cache.c +++ b/src/lib-index/mail-cache.c @@ -435,7 +435,8 @@ int mail_cache_map(struct mail_cache *cache, size_t offset, size_t size, if ((size > cache->mmap_length || offset + size > cache->mmap_length) && (offset > 0 || size > sizeof(struct mail_cache_header))) { if (fstat(cache->fd, &st) < 0) { - i_error("fstat(%s) failed: %m", cache->filepath); + e_error(cache->index->event, + "fstat(%s) failed: %m", cache->filepath); return -1; } cache->last_stat_size = st.st_size; diff --git a/src/lib-index/mail-index-alloc-cache.c b/src/lib-index/mail-index-alloc-cache.c index 2f87c4ba4e..e348fabfa7 100644 --- a/src/lib-index/mail-index-alloc-cache.c +++ b/src/lib-index/mail-index-alloc-cache.c @@ -150,9 +150,10 @@ mail_index_alloc_cache_get(struct event *parent_event, const char *mailbox_path, if (errno == ENOENT) { /* it'll be created later */ } else if (errno == EACCES) { - i_error("%s", eacces_error_get("stat", index_dir)); + e_error(parent_event, "%s", + eacces_error_get("stat", index_dir)); } else { - i_error("stat(%s) failed: %m", index_dir); + e_error(parent_event, "stat(%s) failed: %m", index_dir); } } diff --git a/src/lib-index/mail-index.c b/src/lib-index/mail-index.c index 1425ae3810..0d208af8ff 100644 --- a/src/lib-index/mail-index.c +++ b/src/lib-index/mail-index.c @@ -142,7 +142,7 @@ bool mail_index_use_existing_permissions(struct mail_index *index) if (stat(index->dir, &st) < 0) { if (errno != ENOENT) - i_error("stat(%s) failed: %m", index->dir); + e_error(index->event, "stat(%s) failed: %m", index->dir); return FALSE; }