aboutsummaryrefslogtreecommitdiffstats
path: root/cdr
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-10 14:22:11 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-10 14:22:11 +0000
commit4a27254563dcda7a6dac6b10695b5cbe49f9b54e (patch)
tree906031e49cdb54d0394aaecf17866da1db6ed210 /cdr
parent382d2d15dbd4db69c9ac615048b3cd4698bd7760 (diff)
Merged revisions 115596 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r115596 | tilghman | 2008-05-10 09:19:41 -0500 (Sat, 10 May 2008) | 2 lines Ensure that "calldate" is acceptable for a column name. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@115597 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr')
-rw-r--r--cdr/cdr_pgsql.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cdr/cdr_pgsql.c b/cdr/cdr_pgsql.c
index 7a38d1064..f06eee881 100644
--- a/cdr/cdr_pgsql.c
+++ b/cdr/cdr_pgsql.c
@@ -140,6 +140,9 @@ static int pgsql_log(struct ast_cdr *cdr)
AST_RWLIST_TRAVERSE(&psql_columns, cur, list) {
/* For fields not set, simply skip them */
ast_cdr_getvar(cdr, cur->name, &value, buf, sizeof(buf), 0, 0);
+ if (strcmp(cur->name, "calldate") == 0 && !value) {
+ ast_cdr_getvar(cdr, "start", &value, buf, sizeof(buf), 0, 0);
+ }
if (!value) {
if (cur->notnull && !cur->hasdefault) {
/* Field is NOT NULL (but no default), must include it anyway */