From c25932a107ef4f10914e96a310452fc27d1b02c4 Mon Sep 17 00:00:00 2001 From: Steve Murphy Date: Thu, 21 Jun 2007 22:29:50 +0000 Subject: [PATCH] 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. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70948 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- cdr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cdr.c b/cdr.c index 0646a0af74..01385d85eb 100644 --- a/cdr.c +++ b/cdr.c @@ -736,7 +736,8 @@ int ast_cdr_setamaflags(struct ast_channel *chan, const char *flag) 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; } }