diff options
author | Russell Bryant <russell@russellbryant.com> | 2005-11-06 21:00:35 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2005-11-06 21:00:35 +0000 |
commit | 7d4a5abb1df3aefd47d3da34d4b7bd3f29f9ee96 (patch) | |
tree | dec10ba9652c7082ab81e355b1d477f1aa753d09 /cdr.c | |
parent | bb7eb69c0944b5204fb53b3990c4db3a9ff13dec (diff) |
Convert some built-in applications to use new args parsing macros.
Change ast_cdr_reset to take a pointer to an ast_flags structure instead of an integer for flags.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'cdr.c')
-rwxr-xr-x | cdr.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -809,16 +809,18 @@ static void post_cdr(struct ast_cdr *cdr) } } -void ast_cdr_reset(struct ast_cdr *cdr, int flags) +void ast_cdr_reset(struct ast_cdr *cdr, struct ast_flags *_flags) { - struct ast_flags tmp = {flags}; struct ast_cdr *dup; + struct ast_flags flags = { 0 }; + if (_flags) + ast_copy_flags(&flags, _flags, AST_FLAGS_ALL); while (cdr) { /* Detach if post is requested */ - if (ast_test_flag(&tmp, AST_CDR_FLAG_LOCKED) || !ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) { - if (ast_test_flag(&tmp, AST_CDR_FLAG_POSTED)) { + if (ast_test_flag(&flags, AST_CDR_FLAG_LOCKED) || !ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) { + if (ast_test_flag(&flags, AST_CDR_FLAG_POSTED)) { ast_cdr_end(cdr); if ((dup = ast_cdr_dup(cdr))) { ast_cdr_detach(dup); @@ -827,7 +829,7 @@ void ast_cdr_reset(struct ast_cdr *cdr, int flags) } /* clear variables */ - if (!ast_test_flag(&tmp, AST_CDR_FLAG_KEEP_VARS)) { + if (!ast_test_flag(&flags, AST_CDR_FLAG_KEEP_VARS)) { ast_cdr_free_vars(cdr, 0); } |