[asterisk-commits] rmudgett: branch rmudgett/bridge_phase r389334 - /team/rmudgett/bridge_phase/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon May 20 18:27:36 CDT 2013
Author: rmudgett
Date: Mon May 20 18:27:32 2013
New Revision: 389334
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=389334
Log:
Address some of Matt's review feedback.
Modified:
team/rmudgett/bridge_phase/apps/app_confbridge.c
Modified: team/rmudgett/bridge_phase/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bridge_phase/apps/app_confbridge.c?view=diff&rev=389334&r1=389333&r2=389334
==============================================================================
--- team/rmudgett/bridge_phase/apps/app_confbridge.c (original)
+++ team/rmudgett/bridge_phase/apps/app_confbridge.c Mon May 20 18:27:32 2013
@@ -686,7 +686,8 @@
*
* \param ast Either channel in the announcer channel pair.
*
- * \return Nothing
+ * \retval 0 on success.
+ * \retval -1 on error.
*/
static int announce_channel_push(struct ast_channel *ast)
{
@@ -694,20 +695,20 @@
RAII_VAR(struct announce_pvt *, p, NULL, ao2_cleanup);
RAII_VAR(struct ast_channel *, chan, NULL, ast_channel_unref);
- ast_channel_lock(ast);
- p = ast_channel_tech_pvt(ast);
- if (!p) {
- ast_channel_unlock(ast);
- return -1;
- }
- ao2_ref(p, +1);
- chan = p->base.chan;
- if (!chan) {
- ast_channel_unlock(ast);
- return -1;
- }
- ast_channel_ref(chan);
- ast_channel_unlock(ast);
+ {
+ SCOPED_CHANNELLOCK(lock, ast);
+
+ p = ast_channel_tech_pvt(ast);
+ if (!p) {
+ return -1;
+ }
+ ao2_ref(p, +1);
+ chan = p->base.chan;
+ if (!chan) {
+ return -1;
+ }
+ ast_channel_ref(chan);
+ }
features = ast_bridge_features_new();
if (!features) {
More information about the asterisk-commits
mailing list