diff options
author | Olle Johansson <oej@edvina.net> | 2006-04-15 08:07:50 +0000 |
---|---|---|
committer | Olle Johansson <oej@edvina.net> | 2006-04-15 08:07:50 +0000 |
commit | 6b3367bf5c22dda34d59dd2174f9555d3ad60a54 (patch) | |
tree | 8e37585dc242426cd3070d0e6771d0af748f60ca /channels/chan_sip.c | |
parent | 9250a6d1290fdc21dd21fb43d5bd14532182d0ac (diff) |
New functions for locking a channel - these simplify debugging
when you have channel locking issues.
(Part of the SIP transfer patch, where I had a *lot* of
channel locking problems)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2f123918d..262496945 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1344,7 +1344,7 @@ static int retrans_pkt(void *data) int reschedule = DEFAULT_RETRANS; /* Lock channel */ - ast_mutex_lock(&pkt->owner->lock); + ast_channel_lock(&pkt->owner); if (pkt->retrans < MAX_RETRANS) { pkt->retrans++; @@ -1381,7 +1381,7 @@ static int retrans_pkt(void *data) append_history(pkt->owner, "ReTx", "%d %s", reschedule, pkt->data); __sip_xmit(pkt->owner, pkt->data, pkt->packetlen); - ast_mutex_unlock(&pkt->owner->lock); + ast_channel_unlock(&pkt->owner); return reschedule; } /* Too many retries */ |