mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-17 17:04:35 +00:00
BUG/MINOR: cli: don't stop cli_gen_usage_msg() when kw->usage == NULL
In commit abbf607
("MEDIUM: cli: Add payload support") some cli keywords
without usage message have been added at the beginning of the keywords
array.
cli_gen_usage_usage_msg() use the kw->usage == NULL to stop generating
the usage message for the current keywords array. With those keywords at
the beginning, the whole array in cli.c was ignored in the usage message
generation.
This patch now checks the keyword itself, allowing a keyword without
usage message anywhere in the array.
This commit is contained in:
parent
c55b88ece6
commit
0154edc96f
@ -109,8 +109,9 @@ static char *cli_gen_usage_msg(struct appctx *appctx)
|
|||||||
chunk_strcat(tmp, stats_sock_usage_msg);
|
chunk_strcat(tmp, stats_sock_usage_msg);
|
||||||
list_for_each_entry(kw_list, &cli_keywords.list, list) {
|
list_for_each_entry(kw_list, &cli_keywords.list, list) {
|
||||||
kw = &kw_list->kw[0];
|
kw = &kw_list->kw[0];
|
||||||
while (kw->usage) {
|
while (kw->str_kw[0]) {
|
||||||
chunk_appendf(tmp, " %s\n", kw->usage);
|
if (kw->usage)
|
||||||
|
chunk_appendf(tmp, " %s\n", kw->usage);
|
||||||
kw++;
|
kw++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user