diff options
author | Matthew Jordan <mjordan@digium.com> | 2013-10-27 20:04:17 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2013-10-27 20:04:17 +0000 |
commit | 3713fa5c9f9bab64f21a3602c4a201bcb2458084 (patch) | |
tree | 14a82dae119e398850640e050a97801bcffd3d96 /cdr/cdr_radius.c | |
parent | 2e24dfe4d1c44f978607aaee80225db8e18967fc (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_radius.c')
-rw-r--r-- | cdr/cdr_radius.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cdr/cdr_radius.c b/cdr/cdr_radius.c index 2bf2002fe..1466808d5 100644 --- a/cdr/cdr_radius.c +++ b/cdr/cdr_radius.c @@ -230,7 +230,10 @@ return_cleanup: static int unload_module(void) { - ast_cdr_unregister(name); + if (ast_cdr_unregister(name)) { + return -1; + } + if (rh) { rc_destroy(rh); rh = NULL; |