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
1.2
Steve Murphy 19 years ago
parent e179ccaff2
commit c25932a107

@ -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;
}
}

Loading…
Cancel
Save