X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.c;h=0330186209268cb63b49175e08d4a4102d07e96a;hb=0ed78e50c92e986d1c766a76ba5c3bca6125a989;hp=d3c8376be1a01cf691f4a02be1ffe93c09c4a6b0;hpb=bb2452c85ee39c793838f637f830620b0603dc7d;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index d3c8376be..033018620 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -4179,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; } @@ -4496,8 +4499,7 @@ int cmd_rotate_session(struct ltt_session *session, goto end; } - if (session->live_timer || session->snapshot_mode || - !session->output_traces) { + if (session->live_timer || !session->output_traces) { cmd_ret = LTTNG_ERR_ROTATION_NOT_AVAILABLE; goto end; } @@ -4846,8 +4848,7 @@ int cmd_rotation_set_schedule(struct ltt_session *session, DBG("Cmd rotate set schedule session %s", session->name); - if (session->live_timer || session->snapshot_mode || - !session->output_traces) { + if (session->live_timer || !session->output_traces) { DBG("Failing ROTATION_SET_SCHEDULE command as the rotation feature is not available for this session"); ret = LTTNG_ERR_ROTATION_NOT_AVAILABLE; goto end;