Skip to content

Commit

Permalink
quota: Don't log "Internal quota calculation error"
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sirainen committed Feb 22, 2017
1 parent 6db1c8a commit 13f507c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/plugins/quota/quota-storage.c
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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. */
}
}

Expand Down

0 comments on commit 13f507c

Please sign in to comment.