X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.c;h=821f01cd409d2fa092346ed7b8a9454fb64eb27e;hp=8e06ce6913875dd85e0a17e0eeafb929ba93d425;hb=94382e15b98b3af4ba6810dca2c40a8133325364;hpb=a93b3916055c57baf374c1f566d81f91101daa54 diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 8e06ce691..821f01cd4 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -1791,7 +1791,9 @@ static int _cmd_enable_event(struct ltt_session *session, filter_expression = NULL; filter = NULL; exclusion = NULL; - if (ret != LTTNG_OK && ret != LTTNG_ERR_UST_EVENT_ENABLED) { + if (ret == LTTNG_ERR_UST_EVENT_ENABLED) { + goto already_enabled; + } else if (ret != LTTNG_OK) { goto error; } break; @@ -1889,7 +1891,9 @@ static int _cmd_enable_event(struct ltt_session *session, filter_copy, NULL, wpipe); } - if (ret != LTTNG_OK && ret != LTTNG_ERR_UST_EVENT_ENABLED) { + if (ret == LTTNG_ERR_UST_EVENT_ENABLED) { + goto already_enabled; + } else if (ret != LTTNG_OK) { goto error; } @@ -1916,6 +1920,7 @@ static int _cmd_enable_event(struct ltt_session *session, ret = LTTNG_OK; +already_enabled: error: free(filter_expression); free(filter);