[Asterisk-code-review] chan console: Use correct parameter for 'set active' (asterisk[13])

Tzafrir Cohen asteriskteam at digium.com
Tue Dec 19 10:58:38 CST 2017


Tzafrir Cohen has uploaded this change for review. ( https://gerrit.asterisk.org/7665


Change subject: chan_console: Use correct parameter for 'set active'
......................................................................

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
---
M channels/chan_console.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/65/7665/1

diff --git a/channels/chan_console.c b/channels/chan_console.c
index 02d6887..d7a7213 100644
--- a/channels/chan_console.c
+++ b/channels/chan_console.c
@@ -1235,7 +1235,7 @@
 		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;
 	}

-- 
To view, visit https://gerrit.asterisk.org/7665
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f0e5fe63db19845bee862575b739360797dc73d
Gerrit-Change-Number: 7665
Gerrit-PatchSet: 1
Gerrit-Owner: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171219/274365ae/attachment-0001.html>


More information about the asterisk-code-review mailing list