dect
/
asterisk
Archived
13
0
Fork 0

Merged revisions 70949 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r70949 | murf | 2007-06-21 16:34:41 -0600 (Thu, 21 Jun 2007) | 9 lines

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.
........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70951 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
murf 2007-06-21 22:41:05 +00:00
parent 92dc7fb75d
commit bdbc3c31dd
1 changed files with 5 additions and 2 deletions

View File

@ -848,8 +848,11 @@ int ast_cdr_setamaflags(struct ast_channel *chan, const char *flag)
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;