[asterisk-commits] mmichelson: branch mmichelson/sip_attended_transfer r387624 - in /team/mmiche...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 3 16:53:47 CDT 2013


Author: mmichelson
Date: Fri May  3 16:53:45 2013
New Revision: 387624

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=387624
Log:
Perform a bit of cleanup.


Modified:
    team/mmichelson/sip_attended_transfer/channels/chan_sip.c
    team/mmichelson/sip_attended_transfer/main/bridging.c

Modified: team/mmichelson/sip_attended_transfer/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/sip_attended_transfer/channels/chan_sip.c?view=diff&rev=387624&r1=387623&r2=387624
==============================================================================
--- team/mmichelson/sip_attended_transfer/channels/chan_sip.c (original)
+++ team/mmichelson/sip_attended_transfer/channels/chan_sip.c Fri May  3 16:53:45 2013
@@ -17892,7 +17892,7 @@
 					  sip_pvt_ptr->theirtag, sip_pvt_ptr->tag);
 
 		*out_pvt = sip_pvt_ptr;
-		if (*out_chan) {
+		if (out_chan) {
 			*out_chan = sip_pvt_ptr->owner ? ast_channel_ref(sip_pvt_ptr->owner) : NULL;
 		}
 	}
@@ -26132,9 +26132,7 @@
 	default:
 		break;
 	}
-	/* Tell transferer that we're done. */
-
-	/* at this point if the transfer is successful only the transferer pvt should be locked. */
+
 	return 1;
 }
 

Modified: team/mmichelson/sip_attended_transfer/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/sip_attended_transfer/main/bridging.c?view=diff&rev=387624&r1=387623&r2=387624
==============================================================================
--- team/mmichelson/sip_attended_transfer/main/bridging.c (original)
+++ team/mmichelson/sip_attended_transfer/main/bridging.c Fri May  3 16:53:45 2013
@@ -4942,13 +4942,12 @@
 	RAII_VAR(struct ast_bridge_channel *, transferee_bridge_channel, NULL, ao2_cleanup);
 	char unbridged_chan_name[AST_CHANNEL_NAME];
 
-	{
-		SCOPED_LOCK(lock, transferee, ast_channel_lock, ast_channel_unlock);
-		transferee_bridge_channel = ast_channel_internal_bridge_channel(transferee);
-		if (!transferee_bridge_channel) {
-			return -1;
-		}
-		ao2_ref(transferee_bridge_channel, +1);
+	ast_channel_lock(transferee);
+	transferee_bridge_channel = ast_channel_get_bridge_channel(transferee);
+	ast_channel_unlock(transferee);
+
+	if (!transferee_bridge_channel) {
+		return -1;
 	}
 
 	ast_copy_string(unbridged_chan_name, ast_channel_name(unbridged_chan),




More information about the asterisk-commits mailing list