changeset 4556:b008e75f650a HEAD

Allow empty protocols line when using --exec-mail.
author Timo Sirainen <tss@iki.fi>
date Thu, 10 Aug 2006 22:15:43 +0300
parents 9430af7b0744
children 3da066d844ea
files src/master/master-settings.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/master/master-settings.c	Thu Aug 10 22:06:29 2006 +0300
+++ b/src/master/master-settings.c	Thu Aug 10 22:15:43 2006 +0300
@@ -539,6 +539,11 @@
 
 static bool settings_is_active(struct settings *set)
 {
+	if (*set->protocols == '\0') {
+		/* we're probably using this with --exec-mail */
+		return TRUE;
+	}
+
 	if (set->protocol == MAIL_PROTOCOL_IMAP) {
 		if (strstr(set->protocols, "imap") == NULL)
 			return FALSE;
@@ -1389,6 +1394,8 @@
 		}
 	}
 
+	i_assert(ctx.root != NULL);
+
 	/* settings ok, swap them */
 	temp = settings_pool;
 	settings_pool = settings2_pool;