]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveconf: Fixed showing plugin {} section.
authorTimo Sirainen <tss@iki.fi>
Tue, 22 Mar 2011 21:03:41 +0000 (23:03 +0200)
committerTimo Sirainen <tss@iki.fi>
Tue, 22 Mar 2011 21:03:41 +0000 (23:03 +0200)
src/config/config-request.c
src/config/doveconf.c

index de1c301fb25f4f40a7fc42a3bdc688d643b1fd44..fe39ba4d4344c1ebfb7a416fdbab895b55b5b353 100644 (file)
@@ -286,6 +286,8 @@ settings_export(struct config_export_context *ctx,
                                break;
                        }
                        hash_table_insert(ctx->keys, key, key);
+                       /* for doveconf -n to see this KEY_LIST */
+                       ctx->callback(key, "", CONFIG_KEY_LIST, ctx->context);
 
                        strings = array_get(val, &count);
                        i_assert(count % 2 == 0);
index a28fc2588cde99dfb7ef929014f67788ef924add..0ba8f26b4b87064d93cc5c83cf98f9e54040b698 100644 (file)
@@ -191,12 +191,19 @@ config_dump_human_output(struct config_dump_human_context *ctx,
        for (i = 0; i < count && strings[i][0] == LIST_KEY_PREFIX[0]; i++) T_BEGIN {
                p = strchr(strings[i], '=');
                i_assert(p != NULL);
-               /* string is in format: "list=0 1 2" */
-               for (args = t_strsplit(p + 1, " "); *args != NULL; args++) {
-                       str = p_strdup_printf(ctx->pool, "%s/%s/",
-                                             t_strcut(strings[i]+1, '='),
-                                             *args);
+               if (p[1] == '\0') {
+                       /* "strlist=" */
+                       str = p_strdup_printf(ctx->pool, "%s/",
+                                             t_strcut(strings[i]+1, '='));
                        array_append(&prefixes_arr, &str, 1);
+               } else {
+                       /* string is in format: "list=0 1 2" */
+                       for (args = t_strsplit(p + 1, " "); *args != NULL; args++) {
+                               str = p_strdup_printf(ctx->pool, "%s/%s/",
+                                                     t_strcut(strings[i]+1, '='),
+                                                     *args);
+                               array_append(&prefixes_arr, &str, 1);
+                       }
                }
        } T_END;
        prefixes = array_get(&prefixes_arr, &prefix_count);