TT#69550 silence stray warnings

The DB schema allows for certain columns to be NULL. Handle this
appropriately to elminiate failed assertions from g_strlcpy.

Change-Id: I8768847b96b169dfad94b2ca448cc2af5058d38b
changes/63/34763/1
Richard Fuchs 7 years ago
parent 7fbbe2b411
commit 59a04343b4

@ -615,9 +615,9 @@ int medmysql_fetch_records(med_callid_t *callid,
g_strlcpy(e->callid, row[3], sizeof(e->callid));
g_strlcpy(e->timestamp, row[4], sizeof(e->timestamp));
e->unix_timestamp = atof(row[5]);
g_strlcpy(e->src_leg, row[6], sizeof(e->src_leg));
g_strlcpy(e->dst_leg, row[7], sizeof(e->dst_leg));
g_strlcpy(e->branch_id, row[8], sizeof(e->branch_id));
g_strlcpy(e->src_leg, row[6] ? : "", sizeof(e->src_leg));
g_strlcpy(e->dst_leg, row[7] ? : "", sizeof(e->dst_leg));
g_strlcpy(e->branch_id, row[8] ? : "", sizeof(e->branch_id));
e->valid = 1;
if (check_shutdown())

Loading…
Cancel
Save