[asterisk-commits] murf: branch 1.4 r70949 - in /branches/1.4: ./	main/cdr.c
    SVN commits to the Asterisk project 
    asterisk-commits at lists.digium.com
       
    Thu Jun 21 17:34:41 CDT 2007
    
    
  
Author: murf
Date: Thu Jun 21 17:34:41 2007
New Revision: 70949
URL: http://svn.digium.com/view/asterisk?view=rev&rev=70949
Log:
Merged revisions 70948 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r70948 | murf | 2007-06-21 16:29:50 -0600 (Thu, 21 Jun 2007) | 1 line
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.4/   (props changed)
    branches/1.4/main/cdr.c
Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: branches/1.4/main/cdr.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/cdr.c?view=diff&rev=70949&r1=70948&r2=70949
==============================================================================
--- branches/1.4/main/cdr.c (original)
+++ branches/1.4/main/cdr.c Thu Jun 21 17:34:41 2007
@@ -845,8 +845,11 @@
 	struct ast_cdr *cdr;
 	int newflag = ast_cdr_amaflags2int(flag);
 	if (newflag) {
-		for (cdr = chan->cdr; cdr; cdr = cdr->next)
-			cdr->amaflags = newflag;
+		for (cdr = chan->cdr; cdr; cdr = cdr->next) {
+			if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) {
+				cdr->amaflags = newflag;
+			}
+		}
 	}
 
 	return 0;
    
    
More information about the asterisk-commits
mailing list