changeset 21672:ca4fd60f2259

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.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Wed, 22 Feb 2017 13:02:27 +0200
parents b4dd0868ecc0
children e4b2931f3566
files src/plugins/quota/quota-storage.c
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/quota/quota-storage.c	Wed Feb 22 13:30:00 2017 +0200
+++ b/src/plugins/quota/quota-storage.c	Wed Feb 22 13:02:27 2017 +0200
@@ -238,9 +238,11 @@
 				       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 @@
 				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. */
 		}
 	}