]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: Log all errors with e_error()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 1 Oct 2019 16:07:39 +0000 (19:07 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 17 Feb 2020 11:03:34 +0000 (11:03 +0000)
src/lib-index/mail-cache.c
src/lib-index/mail-index-alloc-cache.c
src/lib-index/mail-index.c

index 61966a2dce2309e4d96719cfdbc24c6fe7a2f1e8..82f74a8a22b02da537b6acbdd7c735dbbcc45183 100644 (file)
@@ -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;
index 2f87c4ba4e6d8a6a4d2549f3441802b2e1950339..e348fabfa70511a3e4c29aae244ba9c333ed0a07 100644 (file)
@@ -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);
                }
        }
 
index 1425ae3810f3564b7b489dfa305aeb6fd5f74dc2..0d208af8ffdb1880c13a44142e544aeddfe444e4 100644 (file)
@@ -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;
        }