Skip to content
Snippets Groups Projects
Commit 0c08b772 authored by Tilghman Lesher's avatar Tilghman Lesher
Browse files

Ensure that "calldate" is acceptable for a column name.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 485b1d9b
Branches
Tags
No related merge requests found
...@@ -140,6 +140,9 @@ static int pgsql_log(struct ast_cdr *cdr) ...@@ -140,6 +140,9 @@ static int pgsql_log(struct ast_cdr *cdr)
AST_RWLIST_TRAVERSE(&psql_columns, cur, list) { AST_RWLIST_TRAVERSE(&psql_columns, cur, list) {
/* For fields not set, simply skip them */ /* For fields not set, simply skip them */
ast_cdr_getvar(cdr, cur->name, &value, buf, sizeof(buf), 0, 0); 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 (!value) {
if (cur->notnull && !cur->hasdefault) { if (cur->notnull && !cur->hasdefault) {
/* Field is NOT NULL (but no default), must include it anyway */ /* Field is NOT NULL (but no default), must include it anyway */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment