[asterisk-commits] russell: branch russell/chan_refcount r82566 - in /team/russell/chan_refcount...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Sep 17 01:59:37 CDT 2007


Author: russell
Date: Mon Sep 17 01:59:35 2007
New Revision: 82566

URL: http://svn.digium.com/view/asterisk?view=rev&rev=82566
Log:
convert app_channelredirect, add a note to the docs of a function

Modified:
    team/russell/chan_refcount/apps/app_channelredirect.c
    team/russell/chan_refcount/include/asterisk/pbx.h

Modified: team/russell/chan_refcount/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_channelredirect.c?view=diff&rev=82566&r1=82565&r2=82566
==============================================================================
--- team/russell/chan_refcount/apps/app_channelredirect.c (original)
+++ team/russell/chan_refcount/apps/app_channelredirect.c Mon Sep 17 01:59:35 2007
@@ -73,17 +73,20 @@
 		goto quit;
 	}
 
-	chan2 = ast_get_channel_by_name_locked(args.channel);
+	chan2 = ast_channel_get_by_name(args.channel);
 	if (!chan2) {
 		ast_log(LOG_WARNING, "No such channel: %s\n", args.channel);
 		goto quit;
 	}
 
+	ast_channel_lock(chan2);
+
 	res = ast_parseable_goto(chan2, args.label);
 
-	ast_mutex_unlock(&chan2->lock);
+	ast_channel_unlock(chan2);
+	ast_channel_unref(chan2);
+
 quit:
-
 	return res;
 }
 

Modified: team/russell/chan_refcount/include/asterisk/pbx.h
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/include/asterisk/pbx.h?view=diff&rev=82566&r1=82565&r2=82566
==============================================================================
--- team/russell/chan_refcount/include/asterisk/pbx.h (original)
+++ team/russell/chan_refcount/include/asterisk/pbx.h Mon Sep 17 01:59:35 2007
@@ -879,6 +879,10 @@
 int pbx_set_autofallthrough(int newval);
 int ast_goto_if_exists(struct ast_channel *chan, const char *context, const char *exten, int priority);
 /* I can find neither parsable nor parseable at dictionary.com, but google gives me 169000 hits for parseable and only 49,800 for parsable */
+
+/*!
+ * \note The channel should be locked before calling this function.
+ */
 int ast_parseable_goto(struct ast_channel *chan, const char *goto_string);
 int ast_explicit_goto(struct ast_channel *chan, const char *context, const char *exten, int priority);
 int ast_async_goto_if_exists(struct ast_channel *chan, const char *context, const char *exten, int priority);




More information about the asterisk-commits mailing list