Merged revisions 7521 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Mon, 19 Dec 2005 05:42:55 +0000 (05:42 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Mon, 19 Dec 2005 05:42:55 +0000 (05:42 +0000)
/branches/1.2

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7522 65c4cc65-6c06-0410-ace0-fbb531ad65f3

cdr.c

diff --git a/cdr.c b/cdr.c
index cedc479..7837f03 100644 (file)
--- a/cdr.c
+++ b/cdr.c
@@ -691,12 +691,15 @@ int ast_cdr_setaccount(struct ast_channel *chan, const char *account)
 
 int ast_cdr_setamaflags(struct ast_channel *chan, const char *flag)
 {
-       struct ast_cdr *cdr = chan->cdr;
+       struct ast_cdr *cdr;
        int newflag;
 
        newflag = ast_cdr_amaflags2int(flag);
-       if (newflag)
-               cdr->amaflags = newflag;
+       if (newflag) {
+               for (cdr = chan->cdr; cdr; cdr = cdr->next) {
+                       cdr->amaflags = newflag;
+               }
+       }
 
        return 0;
 }