If cdr registration somehow succeeds without a config file, don't crash.

(closes issue #14563)
 Reported by: alerios


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@179360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.0
Tilghman Lesher 16 years ago
parent bb4419c8f0
commit 1a1831118b

@ -246,6 +246,11 @@ static int sqlite3_log(struct ast_cdr *cdr)
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;
char subst_buf[2048];

Loading…
Cancel
Save