Prevent CDR backends from unregistering while billing data is in flight
[asterisk/asterisk.git] / cdr / cdr_radius.c
index 2bf2002..1466808 100644 (file)
@@ -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;