From: Oron Peled Date: Tue, 19 Dec 2017 08:50:04 +0000 (+0200) Subject: chan_console: Use correct parameter for 'set active' X-Git-Tag: 13.19.0-rc1~8^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc86e58a5afa8aeb14955500d82e8c57dbf5695b;p=thirdparty%2Fasterisk.git chan_console: Use correct parameter for 'set active' chan_console supports multiple devices but the CLI only works on a single device. 'console set active' selects this device. Sadly that CLI picks the wrong command-line parameter and will only work for a device called 'active'. ASTERISK-27490 #close Change-Id: I2f0e5fe63db19845bee862575b739360797dc73d --- diff --git a/channels/chan_console.c b/channels/chan_console.c index 02d68870b9..d7a72138df 100644 --- a/channels/chan_console.c +++ b/channels/chan_console.c @@ -1235,7 +1235,7 @@ static char *cli_console_active(struct ast_cli_entry *e, int cmd, struct ast_cli return CLI_SUCCESS; } - if (!(pvt = find_pvt(a->argv[e->args - 1]))) { + if (!(pvt = find_pvt(a->argv[e->args]))) { ast_cli(a->fd, "Could not find a device called '%s'.\n", a->argv[e->args]); return CLI_FAILURE; }