mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-28 23:15:59 +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:
@@ -1,5 +1,7 @@
|
||||
2005-11-16 Kevin P. Fleming <kpfleming@limerick.digium.com>
|
||||
|
||||
* apps/app_forkcdr.c (forkcdr_exec): issue warning (and don't segfault) if ForkCDR is called on a channel that doesn't have a CDR (issue #5763)
|
||||
|
||||
* channel.c (ast_queue_hangup): ensure that the channel lock is held before changing its fields... (issue #5770)
|
||||
|
||||
* res/res_musiconhold.c: don't spit out incorrect log messages (and leak memory) during reload (issue #5766)
|
||||
|
||||
@@ -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