diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-31 14:28:29 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-31 14:28:29 +0000 |
commit | 9bf7dbf5a66a00879fb258edbc0395aa3e7e9732 (patch) | |
tree | 32300f9870c66e4580671e5527628996aa149d53 | |
parent | 6c8a201619b96413036ccd74280ed99d87b7e72f (diff) |
Use ast_channel_trylock for channels
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@30990 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 8b2096e21..e25727f58 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1588,8 +1588,8 @@ static int retrans_pkt(void *data) 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 @@ static struct sip_pvt *get_sip_pvt_byid_locked(const char *callid, const char *t 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); |