aboutsummaryrefslogtreecommitdiffstats
path: root/cdr.c
diff options
context:
space:
mode:
author(no author) <(no author)@f38db490-d61c-443f-a65b-d21fe96a405b>2005-06-29 21:01:20 +0000
committer(no author) <(no author)@f38db490-d61c-443f-a65b-d21fe96a405b>2005-06-29 21:01:20 +0000
commit2e18788335055aabf777ff1f36592946c750014d (patch)
tree6bd35f88d11c0d434f75eb1129e38b2e83b144c4 /cdr.c
parent27a9c96742202c8188b53a0173649de479256b69 (diff)
This commit was manufactured by cvs2svn to create tag 'v1-0-9'.
git-svn-id: http://svn.digium.com/svn/asterisk/tags/v1-0-9@6013 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;
}