dovecot-1.1: If SUBSCRIBE or UNSUBSCRIBE fails, we returned "Unk...
dovecot at dovecot.org
dovecot at dovecot.org
Sun May 25 16:05:12 EEST 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/f0600e9db643
changeset: 7552:f0600e9db643
user: Timo Sirainen <tss at iki.fi>
date: Sun May 25 16:05:09 2008 +0300
description:
If SUBSCRIBE or UNSUBSCRIBE fails, we returned "Unknown error".
diffstat:
1 file changed, 3 insertions(+), 7 deletions(-)
src/imap/cmd-subscribe.c | 10 +++-------
diffs (37 lines):
diff -r 5b27f5cbf016 -r f0600e9db643 src/imap/cmd-subscribe.c
--- a/src/imap/cmd-subscribe.c Sun May 25 15:10:59 2008 +0300
+++ b/src/imap/cmd-subscribe.c Sun May 25 16:05:09 2008 +0300
@@ -28,8 +28,6 @@ bool cmd_subscribe_full(struct client_co
bool cmd_subscribe_full(struct client_command_context *cmd, bool subscribe)
{
struct mail_namespace *ns;
- struct mail_storage *storage;
- struct mailbox_list *list;
const char *mailbox, *verify_name;
/* <mailbox> */
@@ -43,11 +41,10 @@ bool cmd_subscribe_full(struct client_co
client_send_tagline(cmd, "NO Unknown namespace.");
return TRUE;
}
- storage = ns->storage;
if ((client_workarounds & WORKAROUND_TB_EXTRA_MAILBOX_SEP) != 0 &&
*mailbox != '\0' && mailbox[strlen(mailbox)-1] ==
- mail_storage_get_hierarchy_sep(storage)) {
+ mail_storage_get_hierarchy_sep(ns->storage)) {
/* verify the validity without the trailing '/' */
verify_name = t_strndup(verify_name, strlen(verify_name)-1);
}
@@ -61,9 +58,8 @@ bool cmd_subscribe_full(struct client_co
return TRUE;
}
- list = mail_storage_get_list(storage);
- if (mailbox_list_set_subscribed(list, mailbox, subscribe) < 0)
- client_send_storage_error(cmd, storage);
+ if (mailbox_list_set_subscribed(ns->list, mailbox, subscribe) < 0)
+ client_send_list_error(cmd, ns->list);
else {
client_send_tagline(cmd, subscribe ?
"OK Subscribe completed." :
More information about the dovecot-cvs
mailing list