Mercurial > dovecot > core-2.2
changeset 12903:a94abbccea0f
doveconf: Fixed showing plugin {} section.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 22 Mar 2011 23:03:41 +0200 |
parents | b5768d835e79 |
children | d7a02077d91f |
files | src/config/config-request.c src/config/doveconf.c |
diffstat | 2 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/config/config-request.c Tue Mar 22 22:50:26 2011 +0200 +++ b/src/config/config-request.c Tue Mar 22 23:03:41 2011 +0200 @@ -286,6 +286,8 @@ 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);
--- a/src/config/doveconf.c Tue Mar 22 22:50:26 2011 +0200 +++ b/src/config/doveconf.c Tue Mar 22 23:03:41 2011 +0200 @@ -191,12 +191,19 @@ 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);