diff options
author | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-06-18 18:40:34 +0000 |
---|---|---|
committer | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-06-18 18:40:34 +0000 |
commit | f35da32eb140cf5d6a424e1b84d8c5717b2ff40e (patch) | |
tree | 112b2166e5e924973cd7d4ad1e986605a47024f5 /channels/chan_dahdi.c | |
parent | d17bd079640c0bca19ae2c91c336f6bb3e235eb1 (diff) |
Merged revisions 269307 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r269307 | rmudgett | 2010-06-09 11:54:38 -0500 (Wed, 09 Jun 2010) | 12 lines
Eliminate deadlock potential in dahdi_fixup().
Calling dahdi_indicate() within dahdi_fixup() while the owner pointers are
in a potentially inconsistent state is a potentially bad thing in
principle.
However, calling dahdi_indicate() when the channel private lock is already
held can cause a deadlock if the PRI lock is needed because
dahdi_indicate() will also get the channel private lock. The pri_grab()
function assumes that the channel private lock is held once to avoid
deadlock.
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@271338 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r-- | channels/chan_dahdi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 2a256f23b..d642fac12 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -5535,10 +5535,11 @@ static int dahdi_fixup(struct ast_channel *oldchan, struct ast_channel *newchan) dahdi_unlink(NULL, p, 0); p->subs[x].owner = newchan; } - if (newchan->_state == AST_STATE_RINGING) - dahdi_indicate(newchan, AST_CONTROL_RINGING, NULL, 0); update_conf(p); ast_mutex_unlock(&p->lock); + if (newchan->_state == AST_STATE_RINGING) { + dahdi_indicate(newchan, AST_CONTROL_RINGING, NULL, 0); + } return 0; } |