summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorSteve Murphy <murf@digium.com>2008-11-21 21:47:16 +0000
committerSteve Murphy <murf@digium.com>2008-11-21 21:47:16 +0000
commit3c018680406392b55e7d1c1ea3f9dbe30bf7fd31 (patch)
treefbac325053b435607b1cb895eac367738109e499 /main
parent8cb6ecdd24a4c710b6aa513a8cbc10a176bfb189 (diff)
Merged revisions 158483 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r158483 | murf | 2008-11-21 14:19:47 -0700 (Fri, 21 Nov 2008) | 11 lines (closes issue #13871) Reported by: mdu113 This one is totally my fault. The code doesn't even create a bridge CDR if the channel CDR has POST_DISABLED. I didn't check for that at the end of the bridge. Fixed with a few small insertions. Tested. Looks good. No cdr generated, no crash, no unnecc. data objects created either. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/features.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/main/features.c b/main/features.c
index 398cb61b1..0692973a3 100644
--- a/main/features.c
+++ b/main/features.c
@@ -2515,13 +2515,15 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
/* obey the NoCDR() wishes. -- move the DISABLED flag to the bridge CDR if it was set on the channel during the bridge... */
if (res != AST_PBX_KEEPALIVE) {
new_chan_cdr = pick_unlocked_cdr(chan->cdr); /* the proper chan cdr, if there are forked cdrs */
- if (new_chan_cdr && ast_test_flag(new_chan_cdr, AST_CDR_FLAG_POST_DISABLED))
+ if (bridge_cdr && new_chan_cdr && ast_test_flag(new_chan_cdr, AST_CDR_FLAG_POST_DISABLED))
ast_set_flag(bridge_cdr, AST_CDR_FLAG_POST_DISABLED);
}
/* we can post the bridge CDR at this point */
- ast_cdr_end(bridge_cdr);
- ast_cdr_detach(bridge_cdr);
+ if (bridge_cdr) {
+ ast_cdr_end(bridge_cdr);
+ ast_cdr_detach(bridge_cdr);
+ }
/* do a specialized reset on the beginning channel
CDR's, if they still exist, so as not to mess up