X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf%2Fir%2Ftrace.c;fp=formats%2Fctf%2Fir%2Ftrace.c;h=686ba798c4a9c1428f6dcc110208433086c16d92;hb=319fd969d5f098775f83f9a4c5c394d4a96db999;hp=2c0e7670f627600ef4bf7dc8ab3e7cbbd1aa02be;hpb=b25d20adeabe34126cacaf6b7f93883c1c98ad90;p=babeltrace.git diff --git a/formats/ctf/ir/trace.c b/formats/ctf/ir/trace.c index 2c0e7670..686ba798 100644 --- a/formats/ctf/ir/trace.c +++ b/formats/ctf/ir/trace.c @@ -136,43 +136,6 @@ void bt_ctf_trace_destroy(struct bt_object *obj) g_free(trace); } -struct bt_ctf_stream *bt_ctf_trace_create_stream(struct bt_ctf_trace *trace, - struct bt_ctf_stream_class *stream_class) -{ - int ret; - int stream_class_found = 0; - size_t i; - struct bt_ctf_stream *stream = NULL; - - if (!trace || !stream_class) { - goto error; - } - - for (i = 0; i < trace->stream_classes->len; i++) { - if (trace->stream_classes->pdata[i] == stream_class) { - stream_class_found = 1; - } - } - - if (!stream_class_found) { - ret = bt_ctf_trace_add_stream_class(trace, stream_class); - if (ret) { - goto error; - } - } - - stream = bt_ctf_stream_create(stream_class, trace); - if (!stream) { - goto error; - } - - g_ptr_array_add(trace->streams, stream); - return stream; -error: - BT_PUT(stream); - return stream; -} - int bt_ctf_trace_set_environment_field(struct bt_ctf_trace *trace, const char *name, struct bt_value *value) {