dovecot-2.0: imap: Fixed LIST-STATUS when listing subscriptions ...

dovecot at dovecot.org dovecot at dovecot.org
Tue Nov 2 17:32:50 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/3e59dbe29f81
changeset: 12359:3e59dbe29f81
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Nov 02 15:32:47 2010 +0000
description:
imap: Fixed LIST-STATUS when listing subscriptions with subscriptions=no namespaces.

diffstat:

 src/imap/cmd-list.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r 4ee632794f0b -r 3e59dbe29f81 src/imap/cmd-list.c
--- a/src/imap/cmd-list.c	Tue Nov 02 14:59:13 2010 +0000
+++ b/src/imap/cmd-list.c	Tue Nov 02 15:32:47 2010 +0000
@@ -327,6 +327,7 @@
 			     enum mailbox_info_flags flags)
 {
 	struct imap_status_result result;
+	struct mail_namespace *ns;
 	const char *storage_name, *error;
 
 	if ((flags & (MAILBOX_NONEXISTENT | MAILBOX_NOSELECT)) != 0) {
@@ -339,8 +340,11 @@
 		return;
 	}
 
-	storage_name = mail_namespace_get_storage_name(ctx->ns, name);
-	if (imap_status_get(ctx->cmd, ctx->ns, storage_name,
+	/* if we're listing subscriptions and there are subscriptions=no
+	   namespaces, ctx->ns may not point to correct one */
+	storage_name = name;
+	ns = mail_namespace_find(ctx->ns->user->namespaces, &storage_name);
+	if (imap_status_get(ctx->cmd, ns, storage_name,
 			    &ctx->status_items, &result, &error) < 0) {
 		client_send_line(ctx->cmd->client,
 				 t_strconcat("* ", error, NULL));


More information about the dovecot-cvs mailing list