[dovecot-cvs] dovecot/src/plugins/quota quota-maildir.c,1.7,1.8

tss-movial at dovecot.org tss-movial at dovecot.org
Mon Apr 24 12:49:55 EEST 2006


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

Modified Files:
	quota-maildir.c 
Log Message:
Accidentally reverted 0-is-unlimited-quota change in last commit.



Index: quota-maildir.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-maildir.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- quota-maildir.c	22 Apr 2006 09:34:57 -0000	1.7
+++ quota-maildir.c	24 Apr 2006 09:49:52 -0000	1.8
@@ -319,7 +319,7 @@
 	if (*lines == NULL)
 		return -1;
 
-	/* first line contains the limits */
+	/* first line contains the limits. 0 value mean unlimited. */
 	message_bytes_limit = (uint64_t)-1;
 	message_count_limit = (uint64_t)-1;
 	for (limit = t_strsplit(lines[0], ","); *limit != NULL; limit++) {
@@ -327,10 +327,12 @@
 		if (pos[0] != '\0' && pos[1] == '\0') {
 			switch (pos[0]) {
 			case 'C':
-				message_count_limit = bytes;
+				if (bytes != 0)
+					message_count_limit = bytes;
 				break;
 			case 'S':
-				message_bytes_limit = bytes;
+				if (bytes != 0)
+					message_bytes_limit = bytes;
 				break;
 			}
 		}



More information about the dovecot-cvs mailing list