[asterisk-commits] trunk r30990 - /trunk/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed May 31 07:28:29 MST 2006
Author: oej
Date: Wed May 31 09:28:29 2006
New Revision: 30990
URL: http://svn.digium.com/view/asterisk?rev=30990&view=rev
Log:
Use ast_channel_trylock for channels
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=30990&r1=30989&r2=30990&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed May 31 09:28:29 2006
@@ -1588,8 +1588,8 @@
pkt->retransid = -1;
if (ast_test_flag(pkt, FLAG_FATAL)) {
- while(pkt->owner->owner && ast_mutex_trylock(&pkt->owner->owner->lock)) {
- ast_mutex_unlock(&pkt->owner->lock);
+ while(pkt->owner->owner && ast_channel_trylock(pkt->owner->owner)) {
+ ast_mutex_unlock(&pkt->owner->lock); /* SIP_PVT, not channel */
usleep(1);
ast_mutex_lock(&pkt->owner->lock);
}
@@ -7186,7 +7186,7 @@
sip_pvt_ptr->theirtag, sip_pvt_ptr->tag);
/* deadlock avoidance... */
- while (sip_pvt_ptr->owner && ast_mutex_trylock(&sip_pvt_ptr->owner->lock)) {
+ while (sip_pvt_ptr->owner && ast_channel_trylock(sip_pvt_ptr->owner)) {
ast_mutex_unlock(&sip_pvt_ptr->lock);
usleep(1);
ast_mutex_lock(&sip_pvt_ptr->lock);
More information about the asterisk-commits
mailing list