[dovecot-cvs] dovecot/src/plugins/quota quota-storage.c, 1.17, 1.18 quota.c, 1.21, 1.22

tss at dovecot.org tss at dovecot.org
Sun May 13 20:11:06 EEST 2007


Update of /var/lib/cvs/dovecot/src/plugins/quota
In directory talvi:/tmp/cvs-serv20721/plugins/quota

Modified Files:
	quota-storage.c quota.c 
Log Message:
Error handling rewrite.



Index: quota-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-storage.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- quota-storage.c	17 Apr 2007 16:41:06 -0000	1.17
+++ quota-storage.c	13 May 2007 17:11:03 -0000	1.18
@@ -151,11 +151,12 @@
 	if (ret > 0)
 		return 0;
 	else if (ret == 0) {
-		mail_storage_set_error(t->box->storage, "Quota exceeded");
+		mail_storage_set_error(t->box->storage, MAIL_ERROR_NOSPACE,
+				       "Quota exceeded");
 		return -1;
 	} else {
-		mail_storage_set_error(t->box->storage,
-				       "Internal quota calculation error");
+		mail_storage_set_critical(t->box->storage,
+					  "Internal quota calculation error");
 		return -1;
 	}
 }
@@ -215,10 +216,10 @@
 		ret = quota_test_alloc(qt, st->st_size, &too_large);
 		if (ret == 0) {
 			mail_storage_set_error(t->box->storage,
-					       "Quota exceeded");
+				MAIL_ERROR_NOSPACE, "Quota exceeded");
 			return -1;
 		} else if (ret < 0) {
-			mail_storage_set_error(t->box->storage,
+			mail_storage_set_critical(t->box->storage,
 				"Internal quota calculation error");
 			return -1;
 		}

Index: quota.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- quota.c	17 Apr 2007 15:33:23 -0000	1.21
+++ quota.c	13 May 2007 17:11:03 -0000	1.22
@@ -418,7 +418,7 @@
 	/* the quota information comes from userdb (or even config file),
 	   so there's really no way to support this until some major changes
 	   are done */
-	*error_r = MAILBOX_LIST_ERR_NO_PERMISSION;
+	*error_r = MAIL_ERRSTR_NO_PERMISSION;
 	return -1;
 }
 



More information about the dovecot-cvs mailing list