X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.c;h=d91869fae8c5d69ac3c3ad88ca20e9a902d0f587;hp=507274f35568bc421887ebfb88674d476297af1d;hb=c4a29317fe4eddfd4a779906a108f5779683843f;hpb=124473a3e6a82e10bbb23727fdff6e1f0c0415cb diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 507274f35..d91869fae 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -2684,12 +2684,6 @@ int cmd_start_trace(struct ltt_session *session) /* Flag session that trace should start automatically */ if (usess) { - /* - * Even though the start trace might fail, flag this session active so - * other application coming in are started by default. - */ - usess->active = 1; - ret = ust_app_start_trace_all(usess); if (ret < 0) { ret = LTTNG_ERR_UST_START_FAIL; @@ -2781,12 +2775,6 @@ int cmd_stop_trace(struct ltt_session *session) } if (usess && usess->active) { - /* - * Even though the stop trace might fail, flag this session inactive so - * other application coming in are not started by default. - */ - usess->active = 0; - ret = ust_app_stop_trace_all(usess); if (ret < 0) { ret = LTTNG_ERR_UST_STOP_FAIL; @@ -4191,10 +4179,13 @@ static enum lttng_error_code record_ust_snapshot(struct ltt_ust_session *usess, goto error_snapshot; } + goto end; + error_snapshot: /* Clean up copied sockets so this output can use some other later on. */ consumer_destroy_output_sockets(output->consumer); error: +end: return status; }