diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-10 14:19:41 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-10 14:19:41 +0000 |
commit | 7fe8fd8510be45d3052bcd873b3d3b98d5e4dfd9 (patch) | |
tree | 63e839bf2225dac4fcbbc492f4eda2719fdf083a /cdr | |
parent | dc664e4b9208c354a67eca202565f7e829605d23 (diff) |
Ensure that "calldate" is acceptable for a column name.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115596 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr')
-rw-r--r-- | cdr/cdr_pgsql.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cdr/cdr_pgsql.c b/cdr/cdr_pgsql.c index 8e4e1764a..ffc520358 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 */ |