From: Timo Sirainen Date: Wed, 22 Feb 2017 11:02:27 +0000 (+0200) Subject: quota: Don't log "Internal quota calculation error" X-Git-Tag: 2.3.0.rc1~2019 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=13f507c0df27fee7b30cb965574e077a22606502;p=thirdparty%2Fdovecot%2Fcore.git quota: Don't log "Internal quota calculation error" It's not very informative and we can't give a better error message without changing the APIs. The real error should have been logged already anyway, so this is just duplication of an error. I think originally this was added because some backend forgot to log an error. --- diff --git a/src/plugins/quota/quota-storage.c b/src/plugins/quota/quota-storage.c index 47adb62f80..392d636035 100644 --- a/src/plugins/quota/quota-storage.c +++ b/src/plugins/quota/quota-storage.c @@ -238,9 +238,11 @@ static int quota_check(struct mail_save_context *ctx, struct mailbox *src_box) qt->quota->set->quota_exceeded_msg); return -1; } else { - mail_storage_set_critical(t->box->storage, - "Internal quota calculation error"); - /* allow saving anyway */ + /* allow saving anyway. don't log an error, because at this + point we can't give very informative error without API + changes. the real error should have been logged already + (except if this was due to quota calculation on background, + then we intentionally don't want to log anything) */ return 0; } } @@ -298,9 +300,8 @@ quota_save_begin(struct mail_save_context *ctx, struct istream *input) qt->quota->set->quota_exceeded_msg); return -1; } else if (ret < 0) { - mail_storage_set_critical(t->box->storage, - "Internal quota calculation error"); - /* allow saving anyway */ + /* allow saving anyway. don't log an error - see + quota_check() for reasons. */ } }