[asterisk-commits] jdixon: branch jdixon/chan_usbradio-1.4 r169329 - /team/jdixon/chan_usbradio-...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jan 19 12:40:47 CST 2009
Author: jdixon
Date: Mon Jan 19 12:40:47 2009
New Revision: 169329
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=169329
Log:
Fixed segfault with ast_bridge and cdr stuff
Modified:
team/jdixon/chan_usbradio-1.4/res/res_features.c
Modified: team/jdixon/chan_usbradio-1.4/res/res_features.c
URL: http://svn.digium.com/svn-view/asterisk/team/jdixon/chan_usbradio-1.4/res/res_features.c?view=diff&rev=169329&r1=169328&r2=169329
==============================================================================
--- team/jdixon/chan_usbradio-1.4/res/res_features.c (original)
+++ team/jdixon/chan_usbradio-1.4/res/res_features.c Mon Jan 19 12:40:47 2009
@@ -1765,16 +1765,19 @@
}
ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP);
- /* 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))
- 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)
+ {
+ /* 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))
+ 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);
+ }
/* do a specialized reset on the beginning channel
CDR's, if they still exist, so as not to mess up
More information about the asterisk-commits
mailing list