diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-03 02:43:06 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-03 02:43:06 +0000 |
commit | 724e4e9b9c6c9d12d6545a6f1b084aaf2cc3ba98 (patch) | |
tree | 416eeb3ce55d656f75708ad9ed351525270ef34c /channels/chan_local.c | |
parent | 6e39b348bdccc39c8f5a9997c0cc1920857c6f6b (diff) |
Merged revisions 273830 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r273830 | tilghman | 2010-07-02 21:36:31 -0500 (Fri, 02 Jul 2010) | 16 lines
Merged revisions 273793 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r273793 | tilghman | 2010-07-02 16:36:39 -0500 (Fri, 02 Jul 2010) | 9 lines
Have the DEADLOCK_AVOIDANCE macro warn when an unlock fails, to help catch potentially large software bugs.
(closes issue #17407)
Reported by: pdf
Patches:
20100527__issue17407.diff.txt uploaded by tilghman (license 14)
Review: https://reviewboard.asterisk.org/r/751/
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@273831 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_local.c')
-rw-r--r-- | channels/chan_local.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index d35f35642..8c826626a 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -225,7 +225,11 @@ static int local_queue_frame(struct local_pvt *p, int isoutbound, struct ast_fra /* Ensure that we have both channels locked */ while (other && ast_channel_trylock(other)) { - ast_mutex_unlock(&p->lock); + int res; + if ((res = ast_mutex_unlock(&p->lock))) { + ast_log(LOG_ERROR, "chan_local bug! '&p->lock' was not locked when entering local_queue_frame! (%s)\n", strerror(res)); + return -1; + } if (us && us_locked) { do { CHANNEL_DEADLOCK_AVOIDANCE(us); |