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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@115597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.0
Tilghman Lesher 17 years ago
parent 5deec3d5dd
commit cbdbbf7819

@ -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 */

Loading…
Cancel
Save