mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-03 04:16:43 +00:00
ensure CDR pointer is cleared after detaching it from channel (related to issue #4877)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1011,6 +1011,7 @@ int ast_hangup(struct ast_channel *chan)
|
|||||||
if (chan->cdr) { /* End the CDR if it hasn't already */
|
if (chan->cdr) { /* End the CDR if it hasn't already */
|
||||||
ast_cdr_end(chan->cdr);
|
ast_cdr_end(chan->cdr);
|
||||||
ast_cdr_detach(chan->cdr); /* Post and Free the CDR */
|
ast_cdr_detach(chan->cdr); /* Post and Free the CDR */
|
||||||
|
chan->cdr = NULL;
|
||||||
}
|
}
|
||||||
if (ast_test_flag(chan, AST_FLAG_BLOCKING)) {
|
if (ast_test_flag(chan, AST_FLAG_BLOCKING)) {
|
||||||
ast_log(LOG_WARNING, "Hard hangup called by thread %ld on %s, while fd "
|
ast_log(LOG_WARNING, "Hard hangup called by thread %ld on %s, while fd "
|
||||||
|
|||||||
Reference in New Issue
Block a user