dovecot-2.0: convert plugin: Don't crash after finishing convers...

dovecot at dovecot.org dovecot at dovecot.org
Tue May 26 07:39:34 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/446ba4e8d37d
changeset: 9376:446ba4e8d37d
user:      Timo Sirainen <tss at iki.fi>
date:      Tue May 26 00:39:25 2009 -0400
description:
convert plugin: Don't crash after finishing conversion.

diffstat:

1 file changed, 3 insertions(+), 1 deletion(-)
src/plugins/convert/convert-storage.c |    4 +++-

diffs (16 lines):

diff -r 24fa8a39ec0b -r 446ba4e8d37d src/plugins/convert/convert-storage.c
--- a/src/plugins/convert/convert-storage.c	Mon May 25 23:43:39 2009 -0400
+++ b/src/plugins/convert/convert-storage.c	Tue May 26 00:39:25 2009 -0400
@@ -406,9 +406,11 @@ int convert_storage(const char *source_d
 	memset(&ns_set, 0, sizeof(ns_set));
 	ns_set.location = source_data;
 
+	i_assert(user->namespaces == dest_namespaces);
 	source_ns = mail_namespaces_init_empty(user);
+	user->namespaces = dest_namespaces;
+
 	source_ns->set = &ns_set;
-
 	if (mail_storage_create(source_ns, NULL,
 				MAIL_STORAGE_FLAG_NO_AUTOCREATE, &error) < 0) {
 		/* No need for conversion. */


More information about the dovecot-cvs mailing list