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

Jenkins2 asteriskteam at digium.com
Tue Dec 19 15:07:19 CST 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7666 )

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(-)

Approvals:
  Matthew Fredrickson: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/channels/chan_console.c b/channels/chan_console.c
index a24a6c8..4720a75 100644
--- a/channels/chan_console.c
+++ b/channels/chan_console.c
@@ -1233,7 +1233,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/7666
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I2f0e5fe63db19845bee862575b739360797dc73d
Gerrit-Change-Number: 7666
Gerrit-PatchSet: 1
Gerrit-Owner: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171219/2e704b11/attachment.html>


More information about the asterisk-code-review mailing list