dovecot-2.0: config: Don't even try to open <file settings for m...

dovecot at dovecot.org dovecot at dovecot.org
Tue Sep 28 19:09:54 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/2bfe672e7c8a
changeset: 12194:2bfe672e7c8a
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Sep 28 17:09:50 2010 +0100
description:
config: Don't even try to open <file settings for modules we don't care about.

diffstat:

 src/config/config-parser.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (15 lines):

diff -r 65855df71cf4 -r 2bfe672e7c8a src/config/config-parser.c
--- a/src/config/config-parser.c	Tue Sep 28 17:09:29 2010 +0100
+++ b/src/config/config-parser.c	Tue Sep 28 17:09:50 2010 +0100
@@ -656,8 +656,9 @@
 			str_append_c(str, '<');
 			str_append(str, value);
 		} else {
-			if (str_append_file(str, key, value, &error) < 0 &&
-			    config_require_key(ctx, key)) {
+			if (!config_require_key(ctx, key)) {
+				/* don't even try to open the file */
+			} else if (str_append_file(str, key, value, &error) < 0) {
 				/* file reading failed */
 				ctx->error = p_strdup(ctx->pool, error);
 				return -1;


More information about the dovecot-cvs mailing list