[dovecot-cvs] dovecot/src/imap cmd-list.c,1.38,1.39

cras at dovecot.org cras at dovecot.org
Tue Jul 27 02:09:30 EEST 2004


Update of /home/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv27432

Modified Files:
	cmd-list.c 
Log Message:
LSUB sent LIST replies instead of LSUB.



Index: cmd-list.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-list.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- cmd-list.c	26 Jul 2004 15:30:11 -0000	1.38
+++ cmd-list.c	26 Jul 2004 23:09:28 -0000	1.39
@@ -79,7 +79,8 @@
 static int
 list_namespace_mailboxes(struct client *client, struct imap_match_glob *glob,
 			 struct namespace *ns, struct mailbox_list_context *ctx,
-			 int match_inbox, enum mailbox_list_flags list_flags)
+			 int lsub, int match_inbox,
+			 enum mailbox_list_flags list_flags)
 {
 	struct mailbox_list *list;
 	const char *name;
@@ -118,7 +119,7 @@
 		}
 
 		str_truncate(str, 0);
-		str_printfa(str, "* LIST (%s) \"%s\" ",
+		str_printfa(str, "* %s (%s) \"%s\" ", lsub ? "LSUB" : "LIST",
 			    mailbox_flags2str(list->flags, list_flags),
 			    ns->sep_str);
 		imap_quote_append_string(str, name, FALSE);
@@ -153,7 +154,7 @@
 }
 
 static int list_mailboxes(struct client *client,
-			  const char *ref, const char *mask,
+			  const char *ref, const char *mask, int lsub,
 			  enum mailbox_list_flags list_flags)
 {
 	struct namespace *ns;
@@ -258,7 +259,7 @@
 							     cur_ref, cur_mask,
 							     list_flags);
 			if (list_namespace_mailboxes(client, glob, ns, ctx,
-						     match_inbox,
+						     lsub, match_inbox,
 						     list_flags) < 0) {
 				client_send_storage_error(client, ns->storage);
 				t_pop();
@@ -323,7 +324,7 @@
 				"\" \"\"", NULL));
 		}
 	} else {
-		if (list_mailboxes(client, ref, mask, list_flags) < 0)
+		if (list_mailboxes(client, ref, mask, lsub, list_flags) < 0)
 			return TRUE;
 	}
 



More information about the dovecot-cvs mailing list