projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
775b303
)
Backport 1.6.0 fix to trunk (failsafe if db is not loaded)
author
Tilghman Lesher
<tilghman@meg.abyt.es>
Mon, 2 Mar 2009 17:18:48 +0000
(17:18 +0000)
committer
Tilghman Lesher
<tilghman@meg.abyt.es>
Mon, 2 Mar 2009 17:18:48 +0000
(17:18 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179361
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
cdr/cdr_sqlite3_custom.c
patch
|
blob
|
history
diff --git
a/cdr/cdr_sqlite3_custom.c
b/cdr/cdr_sqlite3_custom.c
index
b79bb50
..
08b6752
100644
(file)
--- a/
cdr/cdr_sqlite3_custom.c
+++ b/
cdr/cdr_sqlite3_custom.c
@@
-240,6
+240,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];