dovecot-2.1: imapc: Handle \Noselect flag properly for untagged ...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Sep 13 11:38:59 EEST 2011
details: http://hg.dovecot.org/dovecot-2.1/rev/50d0906b556f
changeset: 13460:50d0906b556f
user: Timo Sirainen <tss at iki.fi>
date: Tue Sep 13 11:38:49 2011 +0300
description:
imapc: Handle \Noselect flag properly for untagged LSUB replies.
diffstat:
src/lib-storage/index/imapc/imapc-list.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r f3eb6cc4b627 -r 50d0906b556f src/lib-storage/index/imapc/imapc-list.c
--- a/src/lib-storage/index/imapc/imapc-list.c Tue Sep 13 11:34:21 2011 +0300
+++ b/src/lib-storage/index/imapc/imapc-list.c Tue Sep 13 11:38:49 2011 +0300
@@ -139,8 +139,15 @@
node = imapc_list_update_tree(list, list->tmp_subscriptions != NULL ?
list->tmp_subscriptions :
list->list.subscriptions, args);
- if (node != NULL)
- node->flags |= MAILBOX_SUBSCRIBED;
+ if (node != NULL) {
+ if ((node->flags & MAILBOX_NOSELECT) == 0)
+ node->flags |= MAILBOX_SUBSCRIBED;
+ else {
+ /* LSUB \Noselect means that the mailbox isn't
+ subscribed, but it has children that are */
+ node->flags &= ~MAILBOX_NOSELECT;
+ }
+ }
}
void imapc_list_register_callbacks(struct imapc_mailbox_list *list)
More information about the dovecot-cvs
mailing list