aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-03 18:29:34 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-03 18:29:34 +0000
commitac8f8f9ce261200e140b889471ca405f607ad996 (patch)
tree6fa8b2033cda00739f12cc836e82aaec6cafa7ce /main
parentfd8dd99adac9c2a93ada9a42e6a1bce0b7d08a17 (diff)
Merged revisions 179841 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r179841 | file | 2009-03-03 14:28:46 -0400 (Tue, 03 Mar 2009) | 16 lines Merged revisions 179840 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r179840 | file | 2009-03-03 14:27:09 -0400 (Tue, 03 Mar 2009) | 9 lines 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.6.0@179842 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/features.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/features.c b/main/features.c
index 3f4d33e6b..c3731af33 100644
--- a/main/features.c
+++ b/main/features.c
@@ -2491,8 +2491,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 */