summaryrefslogtreecommitdiff
path: root/cdr/cdr_syslog.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2013-10-27 20:04:17 +0000
committerMatthew Jordan <mjordan@digium.com>2013-10-27 20:04:17 +0000
commit3713fa5c9f9bab64f21a3602c4a201bcb2458084 (patch)
tree14a82dae119e398850640e050a97801bcffd3d96 /cdr/cdr_syslog.c
parent2e24dfe4d1c44f978607aaee80225db8e18967fc (diff)
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
Diffstat (limited to 'cdr/cdr_syslog.c')
-rw-r--r--cdr/cdr_syslog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cdr/cdr_syslog.c b/cdr/cdr_syslog.c
index dec4d65e9..de8cae4ec 100644
--- a/cdr/cdr_syslog.c
+++ b/cdr/cdr_syslog.c
@@ -235,7 +235,9 @@ static int load_config(int reload)
static int unload_module(void)
{
- ast_cdr_unregister(name);
+ if (ast_cdr_unregister(name)) {
+ return -1;
+ }
if (AST_RWLIST_WRLOCK(&sinks)) {
ast_cdr_register(name, ast_module_info->description, syslog_log);