X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=formats%2Flttng-live%2Flttng-live-plugin.c;h=d7ea14a07092ec06acb2c3ebedaa86996d56a1e9;hb=23285bf35e2f0575ab79666616cec0a57584b00a;hp=608a6dab7321382bf79c8ddff5c7945075d38b44;hpb=2a6d197b310aef3510ed3173236ce266381e96ee;p=babeltrace.git diff --git a/formats/lttng-live/lttng-live-plugin.c b/formats/lttng-live/lttng-live-plugin.c index 608a6dab..d7ea14a0 100644 --- a/formats/lttng-live/lttng-live-plugin.c +++ b/formats/lttng-live/lttng-live-plugin.c @@ -135,7 +135,7 @@ int parse_url(const char *path, struct lttng_live_ctx *ctx) if (ret < 0) { goto end; } - } else { + } else if (ret == 0) { fprintf(stderr, "[error] Missing port number after delimitor ':'\n"); ret = -1; goto end; @@ -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: