]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-fs: Remove fs_set_critical()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 25 Nov 2019 11:20:53 +0000 (13:20 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 11 Dec 2019 10:12:30 +0000 (10:12 +0000)
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.

src/lib-fs/fs-api-private.h
src/lib-fs/fs-api.c

index 6f599a3fa629aa65feb399b83eea5ac5b3c6ac27..ae36713d7320c28bbe07e7366dbe5863f255427f 100644 (file)
@@ -163,7 +163,6 @@ extern const struct fs fs_class_test;
 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);
 
index 7e5ddc7b5e8d0af6b2ba8ffff69239815ca0180c..0e0914248236b82770b8e23ae3286919c3a11fb4 100644 (file)
@@ -1225,17 +1225,6 @@ void fs_set_error(struct fs *fs, const char *fmt, ...)
        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");