Mercurial > dovecot > original-hg > dovecot-1.2
diff src/plugins/imap-quota/imap-quota-plugin.c @ 4513:f91f3bcb7939 HEAD
Fixes to make it compile again.
author | Timo Sirainen <timo.sirainen@movial.fi> |
---|---|
date | Sun, 30 Jul 2006 21:31:23 +0300 |
parents | 5811b2c183fd |
children | 49c9e7588de4 |
line wrap: on
line diff
--- a/src/plugins/imap-quota/imap-quota-plugin.c Sun Jul 30 21:13:03 2006 +0300 +++ b/src/plugins/imap-quota/imap-quota-plugin.c Sun Jul 30 21:31:23 2006 +0300 @@ -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; } }