]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
settings parser: Allow multiple strlist blocks with same name. They just get merged.
authorTimo Sirainen <tss@iki.fi>
Fri, 30 Oct 2009 19:12:33 +0000 (15:12 -0400)
committerTimo Sirainen <tss@iki.fi>
Fri, 30 Oct 2009 19:12:33 +0000 (15:12 -0400)
--HG--
branch : HEAD

src/lib-settings/settings-parser.c

index d6f835c090b515ffeaabf12b731a8ed6375ebd11..f38904b1fc605ff87dff1c52287d1e3a54c7371e 100644 (file)
@@ -344,9 +344,9 @@ static int setting_link_add(struct setting_parser_context *ctx,
 
        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);