This commit is contained in:
Brian West 2014-07-09 07:45:55 -05:00
parent 99d0f134e7
commit e1d814b7e7
1 changed files with 7 additions and 7 deletions

View File

@ -362,14 +362,14 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
var = tmp; var = tmp;
} }
if (cdr_field->quote) { if ((cdr_field->not_null == SWITCH_FALSE) && zstr(var)) {
if ((cdr_field->not_null == SWITCH_FALSE) && zstr(var)) { pq_var = switch_mprintf("null,", var);
pq_var = switch_mprintf("null,", var);
} else {
pq_var = switch_mprintf("'%s',", var);
}
} else { } else {
pq_var = switch_mprintf("%s,", var); if (cdr_field->quote) {
pq_var = switch_mprintf("'%s',", var);
} else {
pq_var = switch_mprintf("%s,", var);
}
} }
/* Resize values buffer to accomodate next var */ /* Resize values buffer to accomodate next var */