src.ctf.lttng-live fix: remove overly strict check for session name
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 8 Aug 2019 04:45:56 +0000 (00:45 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:20 +0000 (11:58 -0400)
The live component checks that the path of a stream contains a
session's name. While this check works when interacting with pre-2.11
peers, there is no reason for a session's name to necessarily be in a
stream's path.

The LTTng relay daemon, as of 2.11, now expresses its path relative to
a session's output path, the session's name no longer appears in a
stream's path.

There are no comments explaining the reason for this check and it is
not present in babeltrace 1.5.x. Hence, it appears safe to remove it.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ic5499976ed45f1f4ae17056b9e881a8455898a44
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1845
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/plugins/ctf/lttng-live/metadata.c

index 910bbf0c3696f3b9207d49747cbf83bc8a8ff4e0..db1dfd7d41025c076dac324fc107f09ff9e745c2 100644 (file)
@@ -283,7 +283,6 @@ int lttng_live_metadata_create_stream(struct lttng_live_session *session,
 {
        struct lttng_live_metadata *metadata = NULL;
        struct lttng_live_trace *trace;
-       const char *match;
        struct ctf_metadata_decoder_config cfg = {
                .log_level = session->log_level,
                .self_comp = session->self_comp,
@@ -299,11 +298,6 @@ int lttng_live_metadata_create_stream(struct lttng_live_session *session,
        metadata->self_comp = session->self_comp;
        metadata->stream_id = stream_id;
 
-       match = strstr(trace_name, session->session_name->str);
-       if (!match) {
-               goto error;
-       }
-
        metadata->decoder = ctf_metadata_decoder_create(&cfg);
        if (!metadata->decoder) {
                goto error;
This page took 0.024872 seconds and 4 git commands to generate.