Skip to content
Snippets Groups Projects
Commit 4eb2c0d8 authored by Russell Bryant's avatar Russell Bryant
Browse files

use correct arguments to ast_cdr_reset from my changes earlier today

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent e8f2ad30
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* many files: Update applications to add an exit status variable, make priority jumping optional, and use new args parsing macros * many files: Update applications to add an exit status variable, make priority jumping optional, and use new args parsing macros
* pbx.c cdr.c res/res_features.c apps/app_dial.c include/asterisk/cdr.h: 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. * pbx.c cdr.c res/res_features.c apps/app_dial.c include/asterisk/cdr.h: 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.
* channels/chan_agent.c: Don't loop forever on an invalid options string * channels/chan_agent.c: Don't loop forever on an invalid options string
* apps/app_disa.c: Fix to use correct arguments to ast_cdr_reset * apps/app_disa.c apps/app_forkcdr.c: Fix to use correct arguments to ast_cdr_reset
2005-11-05 Kevin P. Fleming <kpfleming@digium.com> 2005-11-05 Kevin P. Fleming <kpfleming@digium.com>
......
...@@ -57,16 +57,23 @@ static void ast_cdr_fork(struct ast_channel *chan) ...@@ -57,16 +57,23 @@ static void ast_cdr_fork(struct ast_channel *chan)
{ {
struct ast_cdr *cdr; struct ast_cdr *cdr;
struct ast_cdr *newcdr; struct ast_cdr *newcdr;
struct ast_flags flags = { AST_CDR_FLAG_KEEP_VARS };
if (!chan || !(cdr = chan->cdr)) if (!chan || !(cdr = chan->cdr))
return; return;
while (cdr->next) while (cdr->next)
cdr = cdr->next; cdr = cdr->next;
if (!(newcdr = ast_cdr_dup(cdr))) if (!(newcdr = ast_cdr_dup(cdr)))
return; return;
ast_cdr_append(cdr, newcdr); ast_cdr_append(cdr, newcdr);
ast_cdr_reset(newcdr, AST_CDR_FLAG_KEEP_VARS); ast_cdr_reset(newcdr, &flags);
if (!ast_test_flag(cdr, AST_CDR_FLAG_KEEP_VARS)) if (!ast_test_flag(cdr, AST_CDR_FLAG_KEEP_VARS))
ast_cdr_free_vars(cdr, 0); ast_cdr_free_vars(cdr, 0);
ast_set_flag(cdr, AST_CDR_FLAG_CHILD | AST_CDR_FLAG_LOCKED); ast_set_flag(cdr, AST_CDR_FLAG_CHILD | AST_CDR_FLAG_LOCKED);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment