summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorOron Peled <oron.peled@xorcom.com>2017-12-19 10:50:04 +0200
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2017-12-19 14:12:57 +0200
commitc02e2564073c57d6b0e8a9b55a42ad7fba8675ab (patch)
treea0b1dca11db0f76d6a32103131cf34ca999b5a38 /channels
parent11a1e07ad291df072bccc9896f4d90efd056c1f8 (diff)
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
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_console.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_console.c b/channels/chan_console.c
index a24a6c8af..4720a7576 100644
--- a/channels/chan_console.c
+++ b/channels/chan_console.c
@@ -1233,7 +1233,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;
}