int ret = 0;
uint64_t i, env_field_count;
const char *in_trace_class_name;
- bt_uuid in_uuid;
BT_LOGD("Copying content of trace class: in-tc-addr=%p, out-tc-addr=%p",
in_trace_class, out_trace_class);
bt_trace_class_set_name(out_trace_class, in_trace_class_name);
}
- in_uuid = bt_trace_class_get_uuid(in_trace_class);
- if (in_uuid) {
- bt_trace_class_set_uuid(out_trace_class, in_uuid);
- }
+ /*
+ * Do not copy the trace class UUID as it may be modified and should no
+ * longer have the same UUID.
+ */
/*
* Go over all the entries in the environment section of the trace class
BT_ASSERT(value_name);
BT_ASSERT(value);
- if (bt_value_is_integer(value)) {
+ if (bt_value_is_signed_integer(value)) {
trace_class_status =
bt_trace_class_set_environment_entry_integer(
out_trace_class, value_name,
- bt_value_integer_get(value));
+ bt_value_signed_integer_get(
+ value));
} else if (bt_value_is_string(value)) {
trace_class_status =
bt_trace_class_set_environment_entry_string(
}
+ bt_stream_class_set_packets_have_default_beginning_clock_snapshot(
+ out_stream_class,
+ bt_stream_class_packets_have_default_beginning_clock_snapshot(
+ in_stream_class));
+ bt_stream_class_set_packets_have_default_end_clock_snapshot(
+ out_stream_class,
+ bt_stream_class_packets_have_default_end_clock_snapshot(
+ in_stream_class));
+ bt_stream_class_set_supports_discarded_events(
+ out_stream_class,
+ bt_stream_class_supports_discarded_events(in_stream_class),
+ bt_stream_class_discarded_events_have_default_clock_snapshots(
+ in_stream_class));
+ bt_stream_class_set_supports_discarded_packets(
+ out_stream_class,
+ bt_stream_class_supports_discarded_packets(in_stream_class),
+ bt_stream_class_discarded_packets_have_default_clock_snapshots(
+ in_stream_class));
+
in_name = bt_stream_class_get_name(in_stream_class);
if (in_name) {
status = bt_stream_class_set_name(out_stream_class, in_name);
out_specific_context_fc = create_field_class_copy(md_maps,
in_event_specific_context);
- copy_field_class_content(md_maps,
+ ret = copy_field_class_content(md_maps,
in_event_specific_context, out_specific_context_fc);
if (ret) {
goto error;
/* Copy the payload of this event class. */
out_payload_fc = create_field_class_copy(md_maps,
in_event_payload);
- copy_field_class_content(md_maps,
+ ret = copy_field_class_content(md_maps,
in_event_payload, out_payload_fc);
if (ret) {
goto error;