Prevent CDR backends from unregistering while billing data is in flight

This patch makes it so that CDR backends cannot be unregistered while active
CDR records exist. This helps to prevent billing data from being lost during
restarts and shutdowns.

Review: https://reviewboard.asterisk.org/r/2880/
........

Merged revisions 402081 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matthew Jordan
2013-10-27 20:04:17 +00:00
parent 2e24dfe4d1
commit 3713fa5c9f
14 changed files with 152 additions and 36 deletions

View File

@@ -289,7 +289,9 @@ static int write_cdr(struct ast_cdr *cdr)
static int unload_module(void)
{
ast_cdr_unregister(name);
if (ast_cdr_unregister(name)) {
return -1;
}
free_config(0);