mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -443,6 +443,10 @@ failed:
|
||||
|
||||
static int tds_unload_module(void)
|
||||
{
|
||||
if (ast_cdr_unregister(name)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (settings) {
|
||||
ast_mutex_lock(&tds_lock);
|
||||
mssql_disconnect();
|
||||
@@ -452,8 +456,6 @@ static int tds_unload_module(void)
|
||||
ast_free(settings);
|
||||
}
|
||||
|
||||
ast_cdr_unregister(name);
|
||||
|
||||
dbexit();
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user