Mercurial > dovecot > core
changeset 26734:4e9a1d791b8f
lib-fs: Remove fs_set_critical()
The original idea was similar to mail_storage_set_error/critical()
separation. But in storage they are used to clearly separate between
errors caused by untrusted users vs internal errors. In lib-fs case
all the errors are internal errors. Also all the lib-fs callers are
supposed to log the errors unless they decide to handle them specially,
so there's really no need a fs_set_critical() that just causes them to
be logged twice.
author | Timo Sirainen <timo.sirainen@open-xchange.com> |
---|---|
date | Mon, 25 Nov 2019 13:20:53 +0200 |
parents | fdcf09cb8171 |
children | 55a98c6fa93f |
files | src/lib-fs/fs-api-private.h src/lib-fs/fs-api.c |
diffstat | 2 files changed, 0 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-fs/fs-api-private.h Mon Nov 25 13:19:55 2019 +0200 +++ b/src/lib-fs/fs-api-private.h Mon Nov 25 13:20:53 2019 +0200 @@ -163,7 +163,6 @@ void fs_class_register(const struct fs *fs_class); void fs_set_error(struct fs *fs, const char *fmt, ...) ATTR_FORMAT(2, 3); -void fs_set_critical(struct fs *fs, const char *fmt, ...) ATTR_FORMAT(2, 3); void fs_set_error_async(struct fs *fs);
--- a/src/lib-fs/fs-api.c Mon Nov 25 13:19:55 2019 +0200 +++ b/src/lib-fs/fs-api.c Mon Nov 25 13:20:53 2019 +0200 @@ -1225,17 +1225,6 @@ va_end(args); } -void fs_set_critical(struct fs *fs, const char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - fs_set_verror(fs, fmt, args); - - e_error(fs->event, "%s", fs_last_error(fs)); - va_end(args); -} - void fs_set_error_async(struct fs *fs) { fs_set_error(fs, "Asynchronous operation in progress");