[dovecot-cvs] dovecot/src/deliver Makefile.am, 1.6, 1.7 deliver.c, 1.42, 1.43

tss at dovecot.org tss at dovecot.org
Thu Dec 28 12:26:50 UTC 2006


Update of /var/lib/cvs/dovecot/src/deliver
In directory talvi:/tmp/cvs-serv26302/deliver

Modified Files:
	Makefile.am deliver.c 
Log Message:
deliver was treating boolean settings set to "no" as if they were "yes"
(usually they were supposed to be commented out)


Index: Makefile.am
===================================================================
RCS file: /var/lib/cvs/dovecot/src/deliver/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- Makefile.am	10 Dec 2006 12:35:02 -0000	1.6
+++ Makefile.am	28 Dec 2006 12:26:46 -0000	1.7
@@ -6,6 +6,7 @@
 	-I$(top_srcdir)/src/lib \
 	-I$(top_srcdir)/src/lib-dict \
 	-I$(top_srcdir)/src/lib-mail \
+	-I$(top_srcdir)/src/lib-settings \
 	-I$(top_srcdir)/src/lib-storage \
 	-I$(top_srcdir)/src/lib-storage/index/mbox \
 	-DSYSCONFDIR=\""$(sysconfdir)"\" \

Index: deliver.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/deliver/deliver.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- deliver.c	15 Dec 2006 16:55:30 -0000	1.42
+++ deliver.c	28 Dec 2006 12:26:46 -0000	1.43
@@ -157,8 +157,23 @@
 			       count++, deliver_set->hostname);
 }
 
+#include "settings.h"
+#include "../master/master-settings.h"
+#include "../master/master-settings-defs.c"
+
 #define IS_WHITE(c) ((c) == ' ' || (c) == '\t')
 
+static bool setting_is_bool(const char *name)
+{
+	const struct setting_def *def;
+
+	for (def = setting_defs; def->name != NULL; def++) {
+		if (strcmp(def->name, name) == 0)
+			return def->type == SET_BOOL;
+	}
+	return FALSE;
+}
+
 static void config_file_init(const char *path)
 {
 	struct istream *input;
@@ -231,6 +246,9 @@
 			value++;
 		} while (*value == ' ');
 
+		if (setting_is_bool(key) && strcasecmp(value, "yes") != 0)
+			continue;
+
 		env_put(t_strconcat(t_str_ucase(key), "=", value, NULL));
 	}
 	i_stream_unref(&input);



More information about the dovecot-cvs mailing list