Correct CDR's for supervised transfer (bug #1595)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-10-03 19:59:46 +00:00
parent de1b42b6bf
commit e8f0958d01
4 changed files with 49 additions and 4 deletions

11
cdr.c
View File

@@ -539,11 +539,16 @@ void ast_cdr_reset(struct ast_cdr *cdr, int flags)
}
void ast_cdr_append(struct ast_cdr *cdr, struct ast_cdr *newcdr) {
struct ast_cdr *ast_cdr_append(struct ast_cdr *cdr, struct ast_cdr *newcdr)
{
struct ast_cdr *ret;
if (cdr) {
ret = cdr;
while(cdr->next)
cdr = cdr->next;
cdr->next = newcdr;
} else
ast_log(LOG_ERROR, "Can't append a CDR to NULL!\n");
} else {
ret = newcdr;
}
return ret;
}