diff options
author | Richard Mudgett <rmudgett@digium.com> | 2016-03-04 18:25:21 -0600 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-03-14 13:47:51 -0500 |
commit | 9ae21b510f77899190661e36fe25b07f3fa0f092 (patch) | |
tree | c07e9e86a47e50d8054853d801e349e0a9af95dd /channels | |
parent | 336cae73cc85bac570028ec72dac42fa75691e75 (diff) |
chan_sip.c: Made sip_reinvite_retry() call sip_pvt_lock_full().
Change-Id: I90f04208a089f95488a2460185a8dbc3f6acca12
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index e467b801d..3d45b384e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -22841,18 +22841,14 @@ static int sip_reinvite_retry(const void *data) struct sip_pvt *p = (struct sip_pvt *) data; struct ast_channel *owner; - sip_pvt_lock(p); /* called from schedule thread which requires a lock */ - while ((owner = p->owner) && ast_channel_trylock(owner)) { - sip_pvt_unlock(p); - usleep(1); - sip_pvt_lock(p); - } + owner = sip_pvt_lock_full(p); ast_set_flag(&p->flags[0], SIP_NEEDREINVITE); p->waitid = -1; check_pendings(p); sip_pvt_unlock(p); if (owner) { ast_channel_unlock(owner); + ast_channel_unref(owner); } dialog_unref(p, "unref the dialog ptr from sip_reinvite_retry, because it held a dialog ptr"); return 0; |