[asterisk-commits] mjordan: branch mjordan/12-channel-func r403434 - /team/mjordan/12-channel-fu...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Dec 7 23:44:12 CST 2013


Author: mjordan
Date: Sat Dec  7 23:44:07 2013
New Revision: 403434

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=403434
Log:
res_config_sqlite: Check for CDR unregistration failures

If the CDR unregistration fails due to an inflight CDR, the
res_config_sqlite module needs to bail on unloading itself. Otherwise,
the config could be unloaded (including the CDR table name) while the
CDR engine posts a CDR to the still registered backend, resulting in
a crash.

Modified:
    team/mjordan/12-channel-func/res/res_config_sqlite.c

Modified: team/mjordan/12-channel-func/res/res_config_sqlite.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/12-channel-func/res/res_config_sqlite.c?view=diff&rev=403434&r1=403433&r2=403434
==============================================================================
--- team/mjordan/12-channel-func/res/res_config_sqlite.c (original)
+++ team/mjordan/12-channel-func/res/res_config_sqlite.c Sat Dec  7 23:44:07 2013
@@ -1627,11 +1627,13 @@
 
 static int unload_module(void)
 {
-	if (cli_status_registered)
+	if (cdr_registered && ast_cdr_unregister(RES_CONFIG_SQLITE_NAME)) {
+		return -1;
+	}
+
+	if (cli_status_registered) {
 		ast_cli_unregister_multiple(cli_status, ARRAY_LEN(cli_status));
-
-	if (cdr_registered)
-		ast_cdr_unregister(RES_CONFIG_SQLITE_NAME);
+	}
 
 	ast_config_engine_deregister(&sqlite_engine);
 




More information about the asterisk-commits mailing list