[asterisk-commits] mmichelson: branch mmichelson/digit_manipulation r197192 - /team/mmichelson/d...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 27 13:58:34 CDT 2009
Author: mmichelson
Date: Wed May 27 13:58:30 2009
New Revision: 197192
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=197192
Log:
Remove an unnecessary lock and edit a comment.
Modified:
team/mmichelson/digit_manipulation/channels/chan_sip.c
Modified: team/mmichelson/digit_manipulation/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/mmichelson/digit_manipulation/channels/chan_sip.c?view=diff&rev=197192&r1=197191&r2=197192
==============================================================================
--- team/mmichelson/digit_manipulation/channels/chan_sip.c (original)
+++ team/mmichelson/digit_manipulation/channels/chan_sip.c Wed May 27 13:58:30 2009
@@ -20454,21 +20454,19 @@
}
/* Tell each of the other channels to whom they are now connected */
- /* XXX locking will need to be re-worked here since this is deadlock-prone.*/
- ast_channel_lock(target.chan1);
+ /* No need to lock target.chan1 here since it was previously locked in get_sip_pvt_byid_locked */
+ if (target.chan1->masq) {
/* If the channel thread already did the masquerade, then we don't need to do anything */
- if (target.chan1->masq) {
ast_do_masquerade(target.chan1);
}
- ast_channel_unlock(target.chan1);
if (target.chan2) {
ast_channel_queue_connected_line_update(target.chan1, &connected_to_transferee);
ast_channel_queue_connected_line_update(target.chan2, &connected_to_target);
} else {
/* Since target.chan1 isn't actually connected to another channel, there is no way for us
* to queue a frame so that its connected line status will be updated. Instead, we have to
- * change it directly. The problem is that we cannot run any macros on the channel in this
- * regard. It will have to be something we live with for now
+ * change it directly. Since we are not the channel thread, we cannot run a connected line
+ * interception macro on target.chan1
*/
ast_channel_update_connected_line(target.chan1, &connected_to_target);
}
More information about the asterisk-commits
mailing list