Fix: Report errors occuring in lttng_live_read
[babeltrace.git] / formats / lttng-live / lttng-live-plugin.c
index a8cae580de7a140470fc78180db667839368f40e..d7ea14a07092ec06acb2c3ebedaa86996d56a1e9 100644 (file)
@@ -230,7 +230,7 @@ static int lttng_live_open_trace_read(const char *path)
        }
 
        if (ctx->session_ids->len > 0) {
-               lttng_live_read(ctx);
+               ret = lttng_live_read(ctx);
        }
 
 end_free:
@@ -268,7 +268,9 @@ struct bt_trace_descriptor *lttng_live_open_trace(const char *path, int flags,
        pos->parent.rw_table = NULL;
        pos->parent.event_cb = NULL;
        pos->parent.trace = &pos->trace_descriptor;
-       lttng_live_open_trace_read(path);
+       if (lttng_live_open_trace_read(path) < 0) {
+               goto error;
+       }
        return &pos->trace_descriptor;
 
 error:
This page took 0.022779 seconds and 4 git commands to generate.