diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-03 18:27:09 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-03 18:27:09 +0000 |
commit | 5e79a9d71162470178be069f8ddf824ee296119b (patch) | |
tree | 96f246a671f4f3bc3a18e394fe1161f9c6d58180 | |
parent | 0167fbba73144e7dcf81a783a1d6c985343222f4 (diff) |
Do not assume that the bridge_cdr is still attached to the channel when the 'h' exten is finished executing.
It is possible for a masquerade operation to occur when the 'h' exten is operating. This operation moves
the CDR records around causing the bridge_cdr to no longer exist on the channel where it is expected to.
We can not safely modify it afterwards because of this, so don't even try.
(closes issue #14564)
Reported by: meric
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@179840 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | res/res_features.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/res/res_features.c b/res/res_features.c index 819481e8b..cbdd57aaa 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1958,8 +1958,13 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast ast_channel_lock(chan); ast_copy_string(chan->exten, save_exten, sizeof(chan->exten)); chan->priority = save_prio; - if (bridge_cdr) - chan->cdr = swapper; + if (bridge_cdr) { + if (chan->cdr == bridge_cdr) { + chan->cdr = swapper; + } else { + bridge_cdr = NULL; + } + } ast_set_flag(chan, AST_FLAG_BRIDGE_HANGUP_RUN); ast_channel_unlock(chan); /* protect the lastapp/lastdata against the effects of the hangup/dialplan code */ |