diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-02 17:16:57 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-02 17:16:57 +0000 |
commit | 293aacfd53603c09df08f49c96fb1715044f29e8 (patch) | |
tree | 28435dfee26db961616bdf66c571c06fe539f634 /cdr | |
parent | ecdab5834b8d0a8a5e0760701590162e84377dbc (diff) |
If cdr registration somehow succeeds without a config file, don't crash.
(closes issue #14563)
Reported by: alerios
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@179360 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr')
-rw-r--r-- | cdr/cdr_sqlite3_custom.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cdr/cdr_sqlite3_custom.c b/cdr/cdr_sqlite3_custom.c index a2027fe58..01ba2d797 100644 --- a/cdr/cdr_sqlite3_custom.c +++ b/cdr/cdr_sqlite3_custom.c @@ -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]; |