dovecot-2.0: lib-storage: Added MAIL_STORAGE_SERVICE_FLAG_NO_NAM...

dovecot at dovecot.org dovecot at dovecot.org
Tue Mar 22 22:50:29 EET 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/b5768d835e79
changeset: 12695:b5768d835e79
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Mar 22 22:50:26 2011 +0200
description:
lib-storage: Added MAIL_STORAGE_SERVICE_FLAG_NO_NAMESPACES flag.

diffstat:

 src/lib-storage/mail-storage-service.c |  8 +++++---
 src/lib-storage/mail-storage-service.h |  4 +++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 4f1b77b81cf3 -r b5768d835e79 src/lib-storage/mail-storage-service.c
--- a/src/lib-storage/mail-storage-service.c	Mon Mar 21 19:16:14 2011 +0200
+++ b/src/lib-storage/mail-storage-service.c	Tue Mar 22 22:50:26 2011 +0200
@@ -481,9 +481,11 @@
 		mail_user_unref(&mail_user);
 		return -1;
 	}
-	if (mail_namespaces_init(mail_user, error_r) < 0) {
-		mail_user_unref(&mail_user);
-		return -1;
+	if ((ctx->flags & MAIL_STORAGE_SERVICE_FLAG_NO_NAMESPACES) == 0) {
+		if (mail_namespaces_init(mail_user, error_r) < 0) {
+			mail_user_unref(&mail_user);
+			return -1;
+		}
 	}
 	*mail_user_r = mail_user;
 	return 0;
diff -r 4f1b77b81cf3 -r b5768d835e79 src/lib-storage/mail-storage-service.h
--- a/src/lib-storage/mail-storage-service.h	Mon Mar 21 19:16:14 2011 +0200
+++ b/src/lib-storage/mail-storage-service.h	Tue Mar 22 22:50:26 2011 +0200
@@ -31,7 +31,9 @@
 	/* Don't close auth connections because of idling. */
 	MAIL_STORAGE_SERVICE_FLAG_NO_IDLE_TIMEOUT	= 0x200,
 	/* When executing doveconf, tell it to use sysexits codes */
-	MAIL_STORAGE_SERVICE_FLAG_USE_SYSEXITS		= 0x400
+	MAIL_STORAGE_SERVICE_FLAG_USE_SYSEXITS		= 0x400,
+	/* Don't create namespaces, only the user. */
+	MAIL_STORAGE_SERVICE_FLAG_NO_NAMESPACES		= 0x800
 };
 
 struct mail_storage_service_input {


More information about the dovecot-cvs mailing list