[asterisk-commits] rmudgett: trunk r390439 - /trunk/bridges/bridge_native_rtp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 4 17:51:06 CDT 2013


Author: rmudgett
Date: Tue Jun  4 17:51:04 2013
New Revision: 390439

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=390439
Log:
Simple lock, assignment, unlock sandwich optimization.

Modified:
    trunk/bridges/bridge_native_rtp.c

Modified: trunk/bridges/bridge_native_rtp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/bridges/bridge_native_rtp.c?view=diff&rev=390439&r1=390438&r2=390439
==============================================================================
--- trunk/bridges/bridge_native_rtp.c (original)
+++ trunk/bridges/bridge_native_rtp.c Tue Jun  4 17:51:04 2013
@@ -18,7 +18,7 @@
 
 /*! \file
  *
- * \brief Native RTP bridging module
+ * \brief Native RTP bridging technology module
  *
  * \author Joshua Colp <jcolp at digium.com>
  *
@@ -251,14 +251,12 @@
 	}
 
 	ast_channel_lock(bridge_channel->chan);
-
-	if (!(data->id = ast_framehook_attach(bridge_channel->chan, &hook)) < 0) {
-		ast_channel_unlock(bridge_channel->chan);
+	data->id = ast_framehook_attach(bridge_channel->chan, &hook);
+	ast_channel_unlock(bridge_channel->chan);
+	if (!data->id < 0) {
 		ao2_cleanup(data);
 		return -1;
 	}
-
-	ast_channel_unlock(bridge_channel->chan);
 
 	bridge_channel->bridge_pvt = data;
 




More information about the asterisk-commits mailing list