Force update of the CDR before clearing channel (bug #974)
authorMark Spencer <markster@digium.com>
Mon, 2 Feb 2004 01:13:00 +0000 (01:13 +0000)
committerMark Spencer <markster@digium.com>
Mon, 2 Feb 2004 01:13:00 +0000 (01:13 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2107 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx.c

diff --git a/pbx.c b/pbx.c
index 6f05528..84f6016 100755 (executable)
--- a/pbx.c
+++ b/pbx.c
@@ -1745,6 +1745,10 @@ int ast_pbx_run(struct ast_channel *c)
                                        if (c->_softhangup == AST_SOFTHANGUP_TIMEOUT) {
                                                break;
                                        }
+
+                                       if (c->cdr) {
+                                               ast_cdr_update(c);
+                                       }
                                        goto out;
                                }
                        }