diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-21 22:29:50 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-21 22:29:50 +0000 |
commit | e26e3b17ab08d0653eb827e4c09e3190f06e38db (patch) | |
tree | f9131594b7338bb96f0acb4fefd78d3c73e42685 | |
parent | 047566c1224de26fb0d2aa6e41204291a8bae98b (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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } } |