[lttng-dev] [PATCH lttng-tools] Fix: do not flag consumer as disabled on relayd comm failure
Jérémie Galarneau
jeremie.galarneau at efficios.com
Tue Feb 6 11:55:15 EST 2018
Merged in master, stable-2.10, and stable-2.9.
Thanks!
Jérémie
On Thu, Jan 25, 2018 at 06:57:27PM -0500, Jonathan Rajotte wrote:
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
> ---
> src/bin/lttng-sessiond/cmd.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c
> index a295059..1edcffe 100644
> --- a/src/bin/lttng-sessiond/cmd.c
> +++ b/src/bin/lttng-sessiond/cmd.c
> @@ -920,7 +920,7 @@ static int send_consumer_relayd_socket(enum lttng_domain_type domain,
> /* Connect to relayd and make version check if uri is the control. */
> ret = create_connect_relayd(relayd_uri, &rsock, consumer);
> if (ret != LTTNG_OK) {
> - goto error;
> + goto relayd_comm_error;
> }
> assert(rsock);
>
> @@ -960,10 +960,6 @@ static int send_consumer_relayd_socket(enum lttng_domain_type domain,
> */
>
> close_sock:
> - (void) relayd_close(rsock);
> - free(rsock);
> -
> -error:
> if (ret != LTTNG_OK) {
> /*
> * The consumer output for this session should not be used anymore
> @@ -972,6 +968,10 @@ error:
> */
> consumer->enabled = 0;
> }
> + (void) relayd_close(rsock);
> + free(rsock);
> +
> +relayd_comm_error:
> return ret;
> }
>
> --
> 2.7.4
>
More information about the lttng-dev
mailing list