[svn-commits] murf: branch 1.4 r139074 - /branches/1.4/main/cdr.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Aug 20 12:14:55 CDT 2008


Author: murf
Date: Wed Aug 20 12:14:55 2008
New Revision: 139074

URL: http://svn.digium.com/view/asterisk?view=rev&rev=139074
Log:

(closes issue #13263)
Reported by: brainy
Tested by: murf

The specialized reset routine is tromping on the
flags field of the CDR. I made a change to not
reset the DISABLED bit. This should get rid of this
problem.



Modified:
    branches/1.4/main/cdr.c

Modified: branches/1.4/main/cdr.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/cdr.c?view=diff&rev=139074&r1=139073&r2=139074
==============================================================================
--- branches/1.4/main/cdr.c (original)
+++ branches/1.4/main/cdr.c Wed Aug 20 12:14:55 2008
@@ -1073,12 +1073,15 @@
 
 	if (_flags)
 		ast_copy_flags(&flags, _flags, AST_FLAGS_ALL);
-
-	if (_flags)
-		ast_copy_flags(&flags, _flags, AST_FLAGS_ALL);
 	
 	/* Reset to initial state */
-	ast_clear_flag(cdr, AST_FLAGS_ALL);	
+	if (ast_test_flag(cdr, AST_CDR_FLAG_POST_DISABLED)) { /* But do NOT lose the NoCDR() setting */
+		ast_clear_flag(cdr, AST_FLAGS_ALL);	
+		ast_set_flag(cdr, AST_CDR_FLAG_POST_DISABLED);
+	} else {
+		ast_clear_flag(cdr, AST_FLAGS_ALL);	
+	}
+	
 	memset(&cdr->start, 0, sizeof(cdr->start));
 	memset(&cdr->end, 0, sizeof(cdr->end));
 	memset(&cdr->answer, 0, sizeof(cdr->answer));




More information about the svn-commits mailing list