X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.c;h=d8571aa02e8b8317df04f283ef315bc75c1c1d68;hb=46d0fbbc30ab58c8b70e8689d1a0bfe6872286a1;hp=bba77023a6415ff0b52e9f0dcfde6729c5a0856f;hpb=d2f11c4a439e76804369810907e2a22dfcd0956f;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index bba77023a..d8571aa02 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -606,10 +606,11 @@ close_sock: error: if (ret != LTTNG_OK) { /* - * On error, nullify the consumer sequence index so streams are not - * associated with it once sent to the consumer. + * The consumer output for this session should not be used anymore + * since the relayd connection failed thus making any tracing or/and + * streaming not usable. */ - uatomic_set(&consumer->net_seq_index, -1); + consumer->enabled = 0; } return ret; } @@ -856,6 +857,8 @@ int cmd_enable_channel(struct ltt_session *session, DBG("Enabling channel %s for session %s", attr->name, session->name); + rcu_read_lock(); + /* * Don't try to enable a channel if the session has been started at * some point in time before. The tracer does not allow it. @@ -865,8 +868,6 @@ int cmd_enable_channel(struct ltt_session *session, goto error; } - rcu_read_lock(); - switch (domain->type) { case LTTNG_DOMAIN_KERNEL: {