dovecot-2.2: master: If service's protocol isn't in enabled prot...

dovecot at dovecot.org dovecot at dovecot.org
Wed Aug 8 23:46:58 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/06e98529eac8
changeset: 14749:06e98529eac8
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Aug 08 23:46:48 2012 +0300
description:
master: If service's protocol isn't in enabled protocols, don't verify its settings.

diffstat:

 src/master/master-settings.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 84b4459e4dfc -r 06e98529eac8 src/master/master-settings.c
--- a/src/master/master-settings.c	Wed Aug 08 23:41:40 2012 +0300
+++ b/src/master/master-settings.c	Wed Aug 08 23:46:48 2012 +0300
@@ -496,6 +496,13 @@
 	for (i = 0; i < count; i++) {
 		struct service_settings *service = services[i];
 
+		if (*service->protocol != '\0' &&
+		    !str_array_find((const char **)set->protocols_split,
+				    service->protocol)) {
+			/* protocol not enabled, ignore its settings */
+			continue;
+		}
+
 		if (*service->executable == '\0') {
 			*error_r = t_strdup_printf("service(%s): "
 				"executable is empty", service->name);
@@ -550,9 +557,7 @@
 		}
 #endif
 
-		if (*service->protocol != '\0' &&
-		    str_array_find((const char **)set->protocols_split,
-				   service->protocol)) {
+		if (*service->protocol != '\0') {
 			/* each imap/pop3/lmtp process can use up a connection,
 			   although if service_count=1 it's only temporary */
 			if (service->service_count != 1 ||


More information about the dovecot-cvs mailing list