diff options
Diffstat (limited to 'channels/chan_dahdi.c')
-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 2b1ea8a19..54d8b4357 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -5196,10 +5196,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)) { + CHANNEL_DEADLOCK_AVOIDANCE(ast); + } + index = dahdi_get_index(ast, p, 0); /* Hang up if we don't really exist */ |