changeset 10240:dfbdb1e8deb6 HEAD

settings parser: Allow multiple strlist blocks with same name. They just get merged.
author Timo Sirainen <tss@iki.fi>
date Fri, 30 Oct 2009 15:12:33 -0400
parents 83464a815f46
children 3e85df7dc65a
files src/lib-settings/settings-parser.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-settings/settings-parser.c	Fri Oct 30 15:06:38 2009 -0400
+++ b/src/lib-settings/settings-parser.c	Fri Oct 30 15:12:33 2009 -0400
@@ -344,9 +344,9 @@
 
 	link = hash_table_lookup(ctx->links, key);
 	if (link != NULL) {
-		if (def != NULL && def->type == SET_DEFLIST_UNIQUE &&
-		    link->parent == link_copy->parent &&
-		    link->info == link_copy->info)
+		if (link->parent == link_copy->parent &&
+		    link->info == link_copy->info &&
+		    (def == NULL || def->type == SET_DEFLIST_UNIQUE))
 			return 0;
 		ctx->error = p_strconcat(ctx->parser_pool, key,
 					 " already exists", NULL);