[dovecot-cvs] dovecot/src/plugins/imap-quota imap-quota-plugin.c, 1.8, 1.9

tss-movial at dovecot.org tss-movial at dovecot.org
Sun Jul 30 21:31:26 EEST 2006


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

Modified Files:
	imap-quota-plugin.c 
Log Message:
Fixes to make it compile again.



Index: imap-quota-plugin.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/imap-quota/imap-quota-plugin.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- imap-quota-plugin.c	1 Jul 2006 22:27:29 -0000	1.8
+++ imap-quota-plugin.c	30 Jul 2006 18:31:23 -0000	1.9
@@ -28,7 +28,7 @@
 	str_append(str, " (");
 	list = quota_root_get_resources(root);
 	for (i = 0; *list != NULL; list++) {
-		ret = quota_get_resource(root, *list, &value, &limit);
+		ret = quota_get_resource(root, "", *list, &value, &limit);
 		if (ret > 0) {
 			if (i > 0)
 				str_append_c(str, ' ');
@@ -37,8 +37,8 @@
 				    (unsigned long long)limit);
 			i++;
 		} else if (ret < 0) {
-			client_send_line(cmd->client, t_strconcat(
-				"* BAD ", quota_last_error(quota), NULL));
+			client_send_line(cmd->client, 
+				"* BAD Internal quota calculation error");
 		}
 	}
 	str_append_c(str, ')');
@@ -83,7 +83,7 @@
 	str_append(str, "* QUOTAROOT ");
 	imap_quote_append_string(str, mailbox, FALSE);
 
-	iter = quota_root_iter_init(box);
+	iter = quota_root_iter_init(quota, box);
 	while ((root = quota_root_iter_next(iter)) != NULL) {
 		str_append_c(str, ' ');
 		imap_quote_append_string(str, quota_root_get_name(root), FALSE);
@@ -92,7 +92,7 @@
 	client_send_line(cmd->client, str_c(str));
 
 	/* send QUOTA reply for each quotaroot */
-	iter = quota_root_iter_init(box);
+	iter = quota_root_iter_init(quota, box);
 	while ((root = quota_root_iter_next(iter)) != NULL)
 		quota_send(cmd, root);
 	quota_root_iter_deinit(iter);
@@ -132,7 +132,7 @@
 {
 	struct quota_root *root;
         struct imap_arg *args, *arg;
-	const char *root_name, *name;
+	const char *root_name, *name, *error;
 	uint64_t value;
 
 	/* <quota root> <resource limits> */
@@ -166,9 +166,8 @@
 		}
 
                 value = strtoull(IMAP_ARG_STR_NONULL(&arg[1]), NULL, 10);
-		if (quota_set_resource(root, name, value) < 0) {
-			client_send_command_error(cmd,
-						  quota_last_error(quota));
+		if (quota_set_resource(root, name, value, &error) < 0) {
+			client_send_command_error(cmd, error);
 			return TRUE;
 		}
 	}



More information about the dovecot-cvs mailing list