mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 20:08:17 +00:00
issue #5763
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -59,8 +59,7 @@ static void ast_cdr_fork(struct ast_channel *chan)
|
||||
struct ast_cdr *newcdr;
|
||||
struct ast_flags flags = { AST_CDR_FLAG_KEEP_VARS };
|
||||
|
||||
if (!chan || !(cdr = chan->cdr))
|
||||
return;
|
||||
cdr = chan->cdr;
|
||||
|
||||
while (cdr->next)
|
||||
cdr = cdr->next;
|
||||
@@ -79,11 +78,18 @@ static void ast_cdr_fork(struct ast_channel *chan)
|
||||
|
||||
static int forkcdr_exec(struct ast_channel *chan, void *data)
|
||||
{
|
||||
int res=0;
|
||||
int res = 0;
|
||||
struct localuser *u;
|
||||
|
||||
if (!chan->cdr) {
|
||||
ast_log(LOG_WARNING, "Channel does not have a CDR\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
LOCAL_USER_ADD(u);
|
||||
|
||||
if (!ast_strlen_zero(data))
|
||||
ast_set2_flag(chan->cdr, strchr((char *)data, 'v'), AST_CDR_FLAG_KEEP_VARS);
|
||||
ast_set2_flag(chan->cdr, strchr(data, 'v'), AST_CDR_FLAG_KEEP_VARS);
|
||||
|
||||
ast_cdr_fork(chan);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user