diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-02 17:19:41 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-02 17:19:41 +0000 |
commit | f4c7352c74d0474e1db98709f5b5f6a80058d4d1 (patch) | |
tree | babf027380691957d2007c4ec4b4be924bd96b54 /cdr | |
parent | 66d54e04307dae29ede7830e1d13d3d579c34677 (diff) |
Merged revisions 179361 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r179361 | tilghman | 2009-03-02 11:18:48 -0600 (Mon, 02 Mar 2009) | 2 lines
Backport 1.6.0 fix to trunk (failsafe if db is not loaded)
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@179362 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 6c9a431bd..fc4741d41 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 have 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]; |