[svn-commits] russell: branch russell/chan_refcount r82348 - /team/russell/chan_refcount/main/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Sep 13 15:40:58 CDT 2007
Author: russell
Date: Thu Sep 13 15:40:57 2007
New Revision: 82348
URL: http://svn.digium.com/view/asterisk?view=rev&rev=82348
Log:
convert softhangup CLI command handler
Modified:
team/russell/chan_refcount/main/cli.c
Modified: team/russell/chan_refcount/main/cli.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/main/cli.c?view=diff&rev=82348&r1=82347&r2=82348
==============================================================================
--- team/russell/chan_refcount/main/cli.c (original)
+++ team/russell/chan_refcount/main/cli.c Thu Sep 13 15:40:57 2007
@@ -711,16 +711,19 @@
static int handle_softhangup(int fd, int argc, char *argv[])
{
- struct ast_channel *c=NULL;
+ struct ast_channel *c = NULL;
+
if (argc != 3)
return RESULT_SHOWUSAGE;
- c = ast_get_channel_by_name_locked(argv[2]);
+
+ c = ast_channel_get_by_name(argv[2]);
if (c) {
ast_cli(fd, "Requested Hangup on channel '%s'\n", c->name);
ast_softhangup(c, AST_SOFTHANGUP_EXPLICIT);
- ast_channel_unlock(c);
+ ast_channel_unref(c);
} else
ast_cli(fd, "%s is not a known channel\n", argv[2]);
+
return RESULT_SUCCESS;
}
More information about the svn-commits
mailing list