aboutsummaryrefslogtreecommitdiffstats
path: root/cdr.c
diff options
context:
space:
mode:
author(no author) <(no author)@f38db490-d61c-443f-a65b-d21fe96a405b>2005-06-22 14:01:26 +0000
committer(no author) <(no author)@f38db490-d61c-443f-a65b-d21fe96a405b>2005-06-22 14:01:26 +0000
commit37b6f7cd5ab2956c3a9459770f539b8079f52bd6 (patch)
tree495cbc5b5c4f6afec257542b91928ba91d708488 /cdr.c
parent27a9c96742202c8188b53a0173649de479256b69 (diff)
This commit was manufactured by cvs2svn to create tag 'v1-0-8'.
git-svn-id: http://svn.digium.com/svn/asterisk/tags/v1-0-8@5968 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr.c')
-rwxr-xr-xcdr.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/cdr.c b/cdr.c
index f4e97efce..5a8102f30 100755
--- a/cdr.c
+++ b/cdr.c
@@ -524,11 +524,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;
}