[dovecot-cvs] dovecot/src/master master-settings.c,1.140,1.141
cras at dovecot.org
cras at dovecot.org
Fri Sep 22 17:39:09 EEST 2006
Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv6447
Modified Files:
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.140
retrieving revision 1.141
diff -u -d -r1.140 -r1.141
--- master-settings.c 10 Sep 2006 12:48:32 -0000 1.140
+++ master-settings.c 22 Sep 2006 14:39:05 -0000 1.141
@@ -1347,9 +1347,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;
@@ -1392,7 +1397,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