aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-21 22:29:50 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-21 22:29:50 +0000
commite26e3b17ab08d0653eb827e4c09e3190f06e38db (patch)
treef9131594b7338bb96f0acb4fefd78d3c73e42685
parent047566c1224de26fb0d2aa6e41204291a8bae98b (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.2@70948 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--cdr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cdr.c b/cdr.c
index 0646a0af7..01385d85e 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;
}
}