aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authoranthm <anthm@f38db490-d61c-443f-a65b-d21fe96a405b>2004-09-24 21:33:48 +0000
committeranthm <anthm@f38db490-d61c-443f-a65b-d21fe96a405b>2004-09-24 21:33:48 +0000
commit6ffda996af2f5261775610a416e5146d5d394f4f (patch)
tree9dc1614246c2f8319edee2064d5efe8b24880b6a /pbx.c
parentce99091f34f4409c251d35d603e027311521d96e (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-xpbx.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/pbx.c b/pbx.c
index 2bc05ff5d..16888bdbf 100755
--- a/pbx.c
+++ b/pbx.c
@@ -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;
}