[dovecot-cvs] dovecot/src/master master-settings.c, 1.125.2.13, 1.125.2.14

cras at dovecot.org cras at dovecot.org
Fri Sep 22 17:39:06 EEST 2006


Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv26219

Modified Files:
      Tag: branch_1_0
	master-settings.c 
Log Message:
Allow "protocols = none".



Index: master-settings.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/master-settings.c,v
retrieving revision 1.125.2.13
retrieving revision 1.125.2.14
diff -u -d -r1.125.2.13 -r1.125.2.14
--- master-settings.c	10 Aug 2006 19:15:42 -0000	1.125.2.13
+++ master-settings.c	22 Sep 2006 14:39:04 -0000	1.125.2.14
@@ -1349,9 +1349,14 @@
 			i_error("No protocols given in configuration file");
 			return FALSE;
 		}
-		if (!settings_is_active(server->imap))
+		if (!settings_is_active(server->imap)) {
+			if (strcmp(server->imap->protocols, "none") == 0) {
+				if (!nochecks && !settings_verify(server->imap))
+					return FALSE;
+				server->defaults = server->imap;
+			}
 			server->imap = NULL;
-		else {
+		} else {
 			if (!nochecks && !settings_verify(server->imap))
 				return FALSE;
 			server->defaults = server->imap;
@@ -1394,7 +1399,12 @@
 		}
 	}
 
-	i_assert(ctx.root != NULL);
+	if (ctx.root == NULL) {
+		/* We aren't actually checking them separately, but if it
+		   contains only invalid protocols we'll get here.. */
+		i_error("Invalid protocols given in configuration file");
+		return FALSE;
+	}
 
 	/* settings ok, swap them */
 	temp = settings_pool;



More information about the dovecot-cvs mailing list