changeset 1731:687a06278ef5 HEAD

Don't crash if no protocols were given in config file
author Timo Sirainen <tss@iki.fi>
date Sun, 24 Aug 2003 15:49:43 +0300
parents 8480f945e270
children 9f89edcfc043
files src/master/master-settings.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/master/master-settings.c	Sun Aug 24 15:45:32 2003 +0300
+++ b/src/master/master-settings.c	Sun Aug 24 15:49:43 2003 +0300
@@ -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 {