[asterisk-commits] mjordan: trunk r403436 - in /trunk: ./ res/res_config_sqlite.c

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


Author: mjordan
Date: Sat Dec  7 23:59:46 2013
New Revision: 403436

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=403436
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.
........

Merged revisions 403435 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/res/res_config_sqlite.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Sat Dec  7 23:59:46 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-403290,403292-403398
+/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-403290,403292-403398,403435

Modified: trunk/res/res_config_sqlite.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_config_sqlite.c?view=diff&rev=403436&r1=403435&r2=403436
==============================================================================
--- trunk/res/res_config_sqlite.c (original)
+++ trunk/res/res_config_sqlite.c Sat Dec  7 23:59:46 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