[dovecot-cvs] dovecot/src/deliver Makefile.am, 1.1.2.6, 1.1.2.7 deliver.c, 1.20.2.21, 1.20.2.22

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


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

Modified Files:
      Tag: branch_1_0
	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.1.2.6
retrieving revision 1.1.2.7
diff -u -d -r1.1.2.6 -r1.1.2.7
--- Makefile.am	12 Nov 2006 14:06:23 -0000	1.1.2.6
+++ Makefile.am	28 Dec 2006 12:26:35 -0000	1.1.2.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.20.2.21
retrieving revision 1.20.2.22
diff -u -d -r1.20.2.21 -r1.20.2.22
--- deliver.c	19 Nov 2006 22:38:07 -0000	1.20.2.21
+++ deliver.c	28 Dec 2006 12:26:36 -0000	1.20.2.22
@@ -159,8 +159,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;
@@ -233,6 +248,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