[asterisk-commits] russell: branch russell/ast_channel_ao2 r173871 - /team/russell/ast_channel_a...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 6 05:18:41 CST 2009


Author: russell
Date: Fri Feb  6 05:18:40 2009
New Revision: 173871

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=173871
Log:
convert app_mixmonitor

Modified:
    team/russell/ast_channel_ao2/apps/app_mixmonitor.c

Modified: team/russell/ast_channel_ao2/apps/app_mixmonitor.c
URL: http://svn.digium.com/svn-view/asterisk/team/russell/ast_channel_ao2/apps/app_mixmonitor.c?view=diff&rev=173871&r1=173870&r2=173871
==============================================================================
--- team/russell/ast_channel_ao2/apps/app_mixmonitor.c (original)
+++ team/russell/ast_channel_ao2/apps/app_mixmonitor.c Fri Feb  6 05:18:40 2009
@@ -512,11 +512,13 @@
 	if (a->argc < 3)
 		return CLI_SHOWUSAGE;
 
-	if (!(chan = ast_get_channel_by_name_prefix_locked(a->argv[2], strlen(a->argv[2])))) {
+	if (!(chan = ast_channel_get_by_name_prefix(a->argv[2], strlen(a->argv[2])))) {
 		ast_cli(a->fd, "No channel matching '%s' found.\n", a->argv[2]);
 		/* Technically this is a failure, but we don't want 2 errors printing out */
 		return CLI_SUCCESS;
 	}
+
+	ast_channel_lock(chan);
 
 	if (!strcasecmp(a->argv[1], "start")) {
 		mixmonitor_exec(chan, a->argv[3]);
@@ -526,6 +528,8 @@
 		ast_audiohook_detach_source(chan, mixmonitor_spy_type);
 	}
 
+	chan = ast_channel_unref(chan);
+
 	return CLI_SUCCESS;
 }
 




More information about the asterisk-commits mailing list