dovecot-2.0: Crashfix.

dovecot at dovecot.org dovecot at dovecot.org
Fri Oct 2 00:55:21 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/6a3667ea47d7
changeset: 9963:6a3667ea47d7
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Oct 01 17:55:13 2009 -0400
description:
Crashfix.

diffstat:

1 file changed, 20 insertions(+), 19 deletions(-)
src/lib-storage/mail-storage-service.c |   39 ++++++++++++++++----------------

diffs (51 lines):

diff -r c89df0c0e313 -r 6a3667ea47d7 src/lib-storage/mail-storage-service.c
--- a/src/lib-storage/mail-storage-service.c	Thu Oct 01 16:40:32 2009 -0400
+++ b/src/lib-storage/mail-storage-service.c	Thu Oct 01 17:55:13 2009 -0400
@@ -117,27 +117,28 @@ user_reply_handle(struct setting_parser_
 	}
 
 	str = array_get(&reply->extra_fields, &count);
-	for (i = 0; i < count && ret == 0; i++) T_BEGIN {
+	for (i = 0; i < count && ret == 0; i++) {
 		line = str[i];
-		if (strncmp(line, "system_groups_user=", 19) == 0) {
+		if (strncmp(line, "system_groups_user=", 19) == 0)
 			*system_groups_user_r = line + 19;
-			continue;
-		}
-		if (strncmp(line, "mail=", 5) == 0)
-			line = t_strconcat("mail_location=", line + 5, NULL);
-		else if ((p = strchr(str[i], '=')) == NULL)
-			line = t_strconcat(str[i], "=yes", NULL);
-		else
-			line = str[i];
-
-		key = t_strcut(line, '=');
-		if (!settings_parse_is_valid_key(set_parser, key)) {
-			/* assume it's a plugin setting */
-			line = t_strconcat("plugin/", line, NULL);
-		}
-
-		ret = settings_parse_line(set_parser, line);
-	} T_END;
+		else T_BEGIN {
+			if (strncmp(line, "mail=", 5) == 0) {
+				line = t_strconcat("mail_location=",
+						   line + 5, NULL);
+			} else if ((p = strchr(str[i], '=')) == NULL)
+				line = t_strconcat(str[i], "=yes", NULL);
+			else
+				line = str[i];
+
+			key = t_strcut(line, '=');
+			if (!settings_parse_is_valid_key(set_parser, key)) {
+				/* assume it's a plugin setting */
+				line = t_strconcat("plugin/", line, NULL);
+			}
+
+			ret = settings_parse_line(set_parser, line);
+		} T_END;
+	}
 
 	if (ret < 0) {
 		*error_r = t_strdup_printf("Invalid userdb input '%s': %s",


More information about the dovecot-cvs mailing list