BUG/MEDIUM: cli: fix "show stat resolvers" and "show tls-keys"

The recent CLI reorganization managed to break these two commands
by having their parser return 1 (indicating an end of processing)
instead of 0 to indicate new calls to the io handler were needed.

Namely the faulty commits are :
  69e9644 ("REORG: cli: move show stat resolvers to dns.c")
  32af203 ("REORG: cli: move ssl CLI functions to ssl_sock.c")

The fix is trivial and there is no other loss of functionality. Thanks
to Dragan Dosen for reporting the issue and the faulty commits. The
backport is needed in 1.7.
This commit is contained in:
Willy Tarreau 2016-12-05 14:50:15 +01:00
parent a1c35ab68d
commit 3067bfa815
2 changed files with 3 additions and 3 deletions

View File

@ -1286,7 +1286,7 @@ static int cli_parse_stat_resolvers(char **args, struct appctx *appctx, void *pr
return 1;
}
}
return 1;
return 0;
}
/* This function dumps counters from all resolvers section and associated name servers.

View File

@ -6140,7 +6140,7 @@ static int cli_parse_show_tlskeys(char **args, struct appctx *appctx, void *priv
if (!*args[2]) {
appctx->ctx.tlskeys.dump_all = 1;
appctx->io_handler = cli_io_handler_tlskeys_files;
return 1;
return 0;
}
if (args[2][0] == '*') {
@ -6156,7 +6156,7 @@ static int cli_parse_show_tlskeys(char **args, struct appctx *appctx, void *priv
}
}
appctx->io_handler = cli_io_handler_tlskeys_entries;
return 1;
return 0;
}