diff options
author | Richard Mudgett <rmudgett@digium.com> | 2011-08-29 21:17:51 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2011-08-29 21:17:51 +0000 |
commit | d9526bc6c8922b5165b031b003f7b53624f73008 (patch) | |
tree | d7b1de933079603d18bdd913f49e004483717ad2 /addons/chan_mobile.c | |
parent | 7067bb8b427c87eda5be0f8574be16a0ded846a6 (diff) |
Merged revisions 333786 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10
................
r333786 | rmudgett | 2011-08-29 16:12:29 -0500 (Mon, 29 Aug 2011) | 13 lines
Merged revisions 333784-333785 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r333784 | rmudgett | 2011-08-29 16:05:43 -0500 (Mon, 29 Aug 2011) | 2 lines
Fix deadlock potential of chan_mobile.c:mbl_ast_hangup().
........
r333785 | rmudgett | 2011-08-29 16:06:16 -0500 (Mon, 29 Aug 2011) | 1 line
Add some do not hold locks notes to channel.h
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@333789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'addons/chan_mobile.c')
-rw-r--r-- | addons/chan_mobile.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/addons/chan_mobile.c b/addons/chan_mobile.c index 7c1492729..743f81168 100644 --- a/addons/chan_mobile.c +++ b/addons/chan_mobile.c @@ -1318,21 +1318,10 @@ static int mbl_queue_hangup(struct mbl_pvt *pvt) static int mbl_ast_hangup(struct mbl_pvt *pvt) { - int res = 0; - for (;;) { - if (pvt->owner) { - if (ast_channel_trylock(pvt->owner)) { - DEADLOCK_AVOIDANCE(&pvt->lock); - } else { - res = ast_hangup(pvt->owner); - /* no need to unlock, ast_hangup() frees the - * channel */ - break; - } - } else - break; + if (pvt->owner) { + ast_hangup(pvt->owner); } - return res; + return 0; } /*! |