Fix lint warnings

** CID 1125105: Unchecked close() return value
formats/ctf/writer/stream.c: 521

** CID 1124085: Use after free
formats/ctf/writer/event-fields.c: 1128

** CID 1124088: Dereference before null check
formats/ctf/writer/stream.c: 371

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix ctf-writer: Reject enumerations containing no mappings

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Test ctf-writer: Verify that enumerations are validated before use

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Parse LTTng indexes

If a trace file has an associated index (same filename and .idx suffix),
we open it and use it instead of generating the index at open.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
babeltrace handle the inactive streams (review needed)

when content_size == 0, just set the timestamp_end of the packet and
reinsert the stream in the heap.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
fix handling of empty packets

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Handle empty streams on iterator init

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Live viewer

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Begin lttng-live input plugin

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Fixes in babeltrace core to support non-CTF traces

Since we will have an effort soon to cleanup the Babeltrace plugin
mechanism, this patch adds just the bits required in Babeltrace to not
crash if a non-ctf is opened.
That way, an input plugin can just implement the open_trace callback and
process its input trace.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
parse hostname v4 and connect

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>