From: Damien Wedhorn Date: Sat, 18 Jan 2014 23:57:57 +0000 (+0000) Subject: Skinny: fix reversed device reset from CLI. X-Git-Tag: 12.1.0-rc1~3^2~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6786133dfede4d748d4d8c107638d8c65d79da67;p=thirdparty%2Fasterisk.git Skinny: fix reversed device reset from CLI. Existing code would do a full device restart when "skinny reset device" was entered at the CLI and do a reset when "skinny reset device restart" entered. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405893 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 35889748ee..917f26caf2 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -3964,15 +3964,15 @@ static char *handle_skinny_reset(struct ast_cli_entry *e, int cmd, struct ast_cl AST_LIST_LOCK(&devices); AST_LIST_TRAVERSE(&devices, d, list) { - int fullrestart = 0; + int resetonly = 1; if (!strcasecmp(a->argv[2], d->id) || !strcasecmp(a->argv[2], d->name) || !strcasecmp(a->argv[2], "all")) { if (!(d->session)) continue; if (a->argc == 4 && !strcasecmp(a->argv[3], "restart")) - fullrestart = 1; + resetonly = 0; - transmit_reset(d, fullrestart); + transmit_reset(d, resetonly); } } AST_LIST_UNLOCK(&devices);