[dovecot-cvs] dovecot/src/master master-settings.c,1.28,1.29

cras at procontrol.fi cras at procontrol.fi
Sun Aug 24 16:49:45 EEST 2003


Update of /home/cvs/dovecot/src/master
In directory danu:/tmp/cvs-serv12508

Modified Files:
	master-settings.c 
Log Message:
Don't crash if no protocols were given in config file



Index: master-settings.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/master-settings.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- master-settings.c	24 Aug 2003 07:55:23 -0000	1.28
+++ master-settings.c	24 Aug 2003 12:49:43 -0000	1.29
@@ -806,6 +806,11 @@
 
 	prev = NULL;
 	for (server = ctx.root; server != NULL; server = server->next) {
+		if (server->imap->protocols == NULL ||
+		    server->pop3->protocols == NULL) {
+			i_error("No protocols given in configuration file");
+			return FALSE;
+		}
 		if (!settings_is_active(server->imap))
 			server->imap = NULL;
 		else {



More information about the dovecot-cvs mailing list