dovecot-2.0: config: Handle obsolete imap_client_workarounds

dovecot at dovecot.org dovecot at dovecot.org
Mon Jul 19 21:19:33 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/d26cf5445598
changeset: 11861:d26cf5445598
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jul 19 19:19:29 2010 +0100
description:
config: Handle obsolete imap_client_workarounds

diffstat:

 src/config/config-parser.c  |   6 +++++-
 src/config/old-set-parser.c |  18 ++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletions(-)

diffs (51 lines):

diff -r be3663900ea8 -r d26cf5445598 src/config/config-parser.c
--- a/src/config/config-parser.c	Mon Jul 19 19:05:36 2010 +0100
+++ b/src/config/config-parser.c	Mon Jul 19 19:19:29 2010 +0100
@@ -783,6 +783,7 @@
 	enum config_line_type type;
 	char *line;
 	int fd, ret = 0;
+	bool handled;
 
 	fd = open(path, O_RDONLY);
 	if (fd < 0) {
@@ -829,7 +830,10 @@
 					 &key, &value);
 		str_truncate(ctx.str, ctx.pathlen);
 
-		if (!old_settings_handle(&ctx, type, key, value))
+		T_BEGIN {
+			handled = old_settings_handle(&ctx, type, key, value);
+		} T_END;
+		if (!handled)
 			config_parser_apply_line(&ctx, type, key, value);
 
 		if (ctx.error != NULL) {
diff -r be3663900ea8 -r d26cf5445598 src/config/old-set-parser.c
--- a/src/config/old-set-parser.c	Mon Jul 19 19:05:36 2010 +0100
+++ b/src/config/old-set-parser.c	Mon Jul 19 19:19:29 2010 +0100
@@ -145,6 +145,24 @@
 		set_rename(ctx, key, "mdbox_rotate_size", value);
 		return TRUE;
 	}
+	if (strcmp(key, "imap_client_workarounds") == 0) {
+		char **args, **arg;
+
+		args = p_strsplit_spaces(pool_datastack_create(), value, " ,");
+		for (arg = args; *arg != NULL; arg++) {
+			if (strcmp(*arg, "outlook-idle") == 0) {
+				*arg = "";
+				obsolete(ctx, "imap_client_workarounds=outlook-idle is no longer necessary");
+			} else if (strcmp(*arg, "netscape-eoh") == 0) {
+				*arg = "";
+				obsolete(ctx, "imap_client_workarounds=netscape-eoh is no longer supported");
+			}
+		}
+		value = t_strarray_join((void *)args, " ");
+		config_parser_apply_line(ctx, CONFIG_LINE_TYPE_KEYVALUE,
+					 key, value);
+		return TRUE;
+	}
 
 	if (strcmp(key, "login_dir") == 0 ||
 	    strcmp(key, "dbox_rotate_min_size") == 0 ||


More information about the dovecot-cvs mailing list