[asterisk-commits] tilghman: branch 1.6.0 r179360 - /branches/1.6.0/cdr/cdr_sqlite3_custom.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 2 11:17:01 CST 2009


Author: tilghman
Date: Mon Mar  2 11:16:57 2009
New Revision: 179360

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=179360
Log:
If cdr registration somehow succeeds without a config file, don't crash.
(closes issue #14563)
 Reported by: alerios

Modified:
    branches/1.6.0/cdr/cdr_sqlite3_custom.c

Modified: branches/1.6.0/cdr/cdr_sqlite3_custom.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/cdr/cdr_sqlite3_custom.c?view=diff&rev=179360&r1=179359&r2=179360
==============================================================================
--- branches/1.6.0/cdr/cdr_sqlite3_custom.c (original)
+++ branches/1.6.0/cdr/cdr_sqlite3_custom.c Mon Mar  2 11:16:57 2009
@@ -245,6 +245,11 @@
 	char *sql = NULL;
 	struct ast_channel dummy = { 0, };
 	int count = 0;
+
+	if (db == NULL) {
+		/* Should not be loaded, but be failsafe. */
+		return 0;
+	}
 
 	{ /* Make it obvious that only sql should be used outside of this block */
 		char *escaped;




More information about the asterisk-commits mailing list