[asterisk-commits] file: branch 1.6.2 r195707 - in /branches/1.6.2: ./ main/features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 20 12:35:15 CDT 2009


Author: file
Date: Wed May 20 12:35:11 2009
New Revision: 195707

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=195707
Log:
Merged revisions 195698 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r195698 | file | 2009-05-20 14:33:02 -0300 (Wed, 20 May 2009) | 12 lines
  
  Merged revisions 195688 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r195688 | file | 2009-05-20 14:30:25 -0300 (Wed, 20 May 2009) | 5 lines
    
    Fix some code that wrongly assumed a pointer would always be non-NULL when dealing with CDRs after a bridge.
    
    (closes issue #15079)
    Reported by: barryf
  ........
................

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/features.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/main/features.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/main/features.c?view=diff&rev=195707&r1=195706&r2=195707
==============================================================================
--- branches/1.6.2/main/features.c (original)
+++ branches/1.6.2/main/features.c Wed May 20 12:35:11 2009
@@ -2526,15 +2526,21 @@
 		   hears nothing but ringing while the macro does its thing. */
 		if (peer_cdr && !ast_tvzero(peer_cdr->answer)) {
 			bridge_cdr->answer = peer_cdr->answer;
-			chan_cdr->answer = peer_cdr->answer;
 			bridge_cdr->disposition = peer_cdr->disposition;
-			chan_cdr->disposition = peer_cdr->disposition;
+			if (chan_cdr) {
+				chan_cdr->answer = peer_cdr->answer;
+				chan_cdr->disposition = peer_cdr->disposition;
+			}
 		} else {
 			ast_cdr_answer(bridge_cdr);
-			ast_cdr_answer(chan_cdr); /* for the sake of cli status checks */
-		}
-		if (ast_test_flag(chan,AST_FLAG_BRIDGE_HANGUP_DONT)) {
-			ast_set_flag(chan_cdr, AST_CDR_FLAG_BRIDGED);
+			if (chan_cdr) {
+				ast_cdr_answer(chan_cdr); /* for the sake of cli status checks */
+			}
+		}
+		if (ast_test_flag(chan,AST_FLAG_BRIDGE_HANGUP_DONT) && (chan_cdr || peer_cdr)) {
+			if (chan_cdr) {
+				ast_set_flag(chan_cdr, AST_CDR_FLAG_BRIDGED);
+			}
 			if (peer_cdr) {
 				ast_set_flag(peer_cdr, AST_CDR_FLAG_BRIDGED);
 			}




More information about the asterisk-commits mailing list