X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Ffs-sink%2Ffs-sink-ctf-meta.h;h=72d47d4aaf53313925039d66b85546f048e9603f;hb=26fc5aedf48df3f1654fe4d0b6ada1a10cd804f2;hp=7585ac745735c5f75a97aa1e9c76c4fd42405303;hpb=335a2da576e59d32c17de2ece1e7e339c50e9c25;p=babeltrace.git diff --git a/src/plugins/ctf/fs-sink/fs-sink-ctf-meta.h b/src/plugins/ctf/fs-sink/fs-sink-ctf-meta.h index 7585ac74..72d47d4a 100644 --- a/src/plugins/ctf/fs-sink/fs-sink-ctf-meta.h +++ b/src/plugins/ctf/fs-sink/fs-sink-ctf-meta.h @@ -18,7 +18,7 @@ #include #include "common/common.h" #include "common/assert.h" -#include "compat/uuid.h" +#include "common/uuid.h" #include #include #include @@ -133,6 +133,7 @@ struct fs_sink_ctf_stream_class { const bt_clock_class *default_clock_class; GString *default_clock_class_name; + bool has_packets; bool packets_have_ts_begin; bool packets_have_ts_end; bool has_discarded_events; @@ -162,7 +163,7 @@ struct fs_sink_ctf_trace { /* Weak */ const bt_trace_class *ir_tc; - unsigned char uuid[BABELTRACE_UUID_LEN]; + bt_uuid_t uuid; /* Array of `struct fs_sink_ctf_stream_class *` (owned by this) */ GPtrArray *stream_classes; @@ -739,6 +740,7 @@ struct fs_sink_ctf_stream_class *fs_sink_ctf_stream_class_create( sc->event_classes_from_ir = g_hash_table_new(g_direct_hash, g_direct_equal); BT_ASSERT(sc->event_classes_from_ir); + sc->has_packets = bt_stream_class_supports_packets(ir_sc); sc->packets_have_ts_begin = bt_stream_class_packets_have_beginning_default_clock_snapshot( ir_sc); @@ -823,11 +825,7 @@ struct fs_sink_ctf_trace *fs_sink_ctf_trace_create(const bt_trace *ir_trace) BT_ASSERT(trace); - if (bt_uuid_generate(trace->uuid)) { - fs_sink_ctf_trace_destroy(trace); - trace = NULL; - goto end; - } + bt_uuid_generate(trace->uuid); trace->ir_trace = ir_trace; trace->ir_tc = bt_trace_borrow_class_const(ir_trace); @@ -835,7 +833,6 @@ struct fs_sink_ctf_trace *fs_sink_ctf_trace_create(const bt_trace *ir_trace) (GDestroyNotify) fs_sink_ctf_stream_class_destroy); BT_ASSERT(trace->stream_classes); -end: return trace; }