diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-25 00:46:24 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-25 00:46:24 +0000 |
commit | e8c34cc34baa6113303d5ca1574c3aed5f2dbeed (patch) | |
tree | 6cf22fab8c53b96ab5bb98f7f8c6fdfb4fc3daa6 | |
parent | 568c3bc68218b2ff92d1d95f1b027719df0d33de (diff) |
Pvt deadlock causes some channels to get stuck in Reserved status.
(closes issue #12621)
Reported by: fabianoheringer
Patches:
20080612__bug12621.diff.txt uploaded by Corydon76 (license 14)
Tested by: fabianoheringer
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@124965 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_dahdi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 49f9d3e71..d14a3bd03 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -4637,10 +4637,11 @@ static struct ast_frame *dahdi_read(struct ast_channel *ast) int index; void *readbuf; struct ast_frame *f; - - ast_mutex_lock(&p->lock); - + while (ast_mutex_trylock(&p->lock)) { + DEADLOCK_AVOIDANCE(&ast->lock); + } + index = dahdi_get_index(ast, p, 0); /* Hang up if we don't really exist */ |