[asterisk-commits] murf: branch 1.2 r70948 - /branches/1.2/cdr.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 21 17:29:50 CDT 2007


Author: murf
Date: Thu Jun 21 17:29:50 2007
New Revision: 70948

URL: http://svn.digium.com/view/asterisk?view=rev&rev=70948
Log:
This little fix is in response to bug 10016, but may not cure it. The code is wrong, clearly. In a situation where you set the CDR's amaflags, and then ForkCDR, and then set the new CDR's amaflags to some other value, you will see that all CDRs have had their amaflags changed. This is not good. So I fixed it.

Modified:
    branches/1.2/cdr.c

Modified: branches/1.2/cdr.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/cdr.c?view=diff&rev=70948&r1=70947&r2=70948
==============================================================================
--- branches/1.2/cdr.c (original)
+++ branches/1.2/cdr.c Thu Jun 21 17:29:50 2007
@@ -736,7 +736,8 @@
 	newflag = ast_cdr_amaflags2int(flag);
 	if (newflag) {
 		for (cdr = chan->cdr; cdr; cdr = cdr->next) {
-			cdr->amaflags = newflag;
+			if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED))
+				cdr->amaflags = newflag;
 		}
 	}
 




More information about the asterisk-commits mailing list