Skip to content

Commit

Permalink
Unirec output: fixed store of array elements to unirec in some functions
Browse files Browse the repository at this point in the history
  • Loading branch information
havraji6 committed Jun 5, 2020
1 parent a9be632 commit 6c0c313
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions extra_plugins/output/unirec/src/translator.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ translate_array_mac(translator_t *trans, const struct translator_rec *rec,
return 1;
}

ur_time_t *field_ptr = ur_get_ptr_by_id(trans->record.ur_tmplt, trans->record.data, ur_id);
ur_time_t *field_ptr = ur_array_append_get_ptr(trans->record.ur_tmplt, trans->record.data, ur_id);
memcpy(field_ptr, list_it.field.data, 6U);
}

Expand All @@ -734,8 +734,7 @@ translate_array_time(translator_t *trans, const struct translator_rec *rec,

fds_blist_iter_init(&list_it, field, NULL);
while ((rc = fds_blist_iter_next(&list_it)) == FDS_OK) {
// Get the value
ur_time_t *field_ptr = ur_get_ptr_by_id(trans->record.ur_tmplt, trans->record.data, ur_id);
ur_time_t *field_ptr = ur_array_append_get_ptr(trans->record.ur_tmplt, trans->record.data, ur_id);

if (translator_store_time(type_ipx, list_it.field.data, list_it.field.size, field_ptr)) {
ur_array_clear(trans->record.ur_tmplt, trans->record.data, ur_id);
Expand Down

0 comments on commit 6c0c313

Please sign in to comment.