diff options
author | anthm <anthm@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-09-24 21:33:48 +0000 |
---|---|---|
committer | anthm <anthm@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-09-24 21:33:48 +0000 |
commit | 6ffda996af2f5261775610a416e5146d5d394f4f (patch) | |
tree | 9dc1614246c2f8319edee2064d5efe8b24880b6a /pbx.c | |
parent | ce99091f34f4409c251d35d603e027311521d96e (diff) |
add app_forkcdr
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3832 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rwxr-xr-x | pbx.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -4387,11 +4387,16 @@ static int pbx_builtin_setlanguage(struct ast_channel *chan, void *data) static int pbx_builtin_resetcdr(struct ast_channel *chan, void *data) { + int flags = 0; /* Reset the CDR as specified */ - if (data) - ast_cdr_reset(chan->cdr, strchr((char *)data, 'w') ? 1 : 0); - else - ast_cdr_reset(chan->cdr, 0); + if(data) { + if(strchr((char *)data, 'w')) + flags |= AST_CDR_FLAG_POSTED; + if(strchr((char *)data, 'a')) + flags |= AST_CDR_FLAG_LOCKED; + } + + ast_cdr_reset(chan->cdr, flags); return 0; } |