dovecot-2.0: Maildir++: Fixed crash when listing subscriptions f...

dovecot at dovecot.org dovecot at dovecot.org
Thu Feb 10 02:21:05 EET 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/4374ae187075
changeset: 12592:4374ae187075
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Feb 10 02:21:03 2011 +0200
description:
Maildir++: Fixed crash when listing subscriptions for a subscriptions=no namespace from LAYOUT=fs namespace.

diffstat:

 src/lib-storage/list/mailbox-list-maildir.c |  19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diffs (36 lines):

diff -r cec7fa92ff48 -r 4374ae187075 src/lib-storage/list/mailbox-list-maildir.c
--- a/src/lib-storage/list/mailbox-list-maildir.c	Thu Feb 10 01:54:26 2011 +0200
+++ b/src/lib-storage/list/mailbox-list-maildir.c	Thu Feb 10 02:21:03 2011 +0200
@@ -126,16 +126,6 @@
 	return TRUE;
 }
 
-static bool ATTR_NORETURN
-maildir_is_valid_pattern(struct mailbox_list *list ATTR_UNUSED,
-			 const char *pattern ATTR_UNUSED)
-{
-	i_unreached();
-#ifndef ATTRS_DEFINED
-	return FALSE;
-#endif
-}
-
 static bool
 maildir_is_valid_existing_name(struct mailbox_list *list, const char *name)
 {
@@ -151,6 +141,15 @@
 }
 
 static bool
+maildir_is_valid_pattern(struct mailbox_list *list, const char *pattern)
+{
+	/* maildir code itself doesn't care about this, but we may get here
+	   from listing subscriptions to LAYOUT=fs namespace containing
+	   entries for a subscriptions=no LAYOUT=maildir++ namespace */
+	return maildir_is_valid_existing_name(list, pattern);
+}
+
+static bool
 maildir_is_valid_create_name(struct mailbox_list *list, const char *name)
 {
 	size_t len;


More information about the dovecot-cvs mailing list