[asterisk-commits] tilghman: trunk r115596 - /trunk/cdr/cdr_pgsql.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat May 10 09:19:45 CDT 2008


Author: tilghman
Date: Sat May 10 09:19:41 2008
New Revision: 115596

URL: http://svn.digium.com/view/asterisk?view=rev&rev=115596
Log:
Ensure that "calldate" is acceptable for a column name.

Modified:
    trunk/cdr/cdr_pgsql.c

Modified: trunk/cdr/cdr_pgsql.c
URL: http://svn.digium.com/view/asterisk/trunk/cdr/cdr_pgsql.c?view=diff&rev=115596&r1=115595&r2=115596
==============================================================================
--- trunk/cdr/cdr_pgsql.c (original)
+++ trunk/cdr/cdr_pgsql.c Sat May 10 09:19:41 2008
@@ -140,6 +140,9 @@
 		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 */




More information about the asterisk-commits mailing list