X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=4ea6d1a777d0fbf33c56471beaed9922261aa06a;hb=fa7fee60cac8659b3a980a6400939a5a24e0e61e;hp=e69ae0d45d76b235fa2634998d38c0e980655605;hpb=ec7ef06ebab243809679f3f643730f5755331514;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index e69ae0d45..4ea6d1a77 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -3383,31 +3383,12 @@ skip_domain: goto error; } - ret = cmd_set_consumer_uri(cmd_ctx->lsm->domain.type, cmd_ctx->session, - nb_uri, uris); + ret = cmd_set_consumer_uri(cmd_ctx->session, nb_uri, uris); + free(uris); if (ret != LTTNG_OK) { - free(uris); goto error; } - /* - * XXX: 0 means that this URI should be applied on the session. Should - * be a DOMAIN enuam. - */ - if (cmd_ctx->lsm->domain.type == 0) { - /* Add the URI for the UST session if a consumer is present. */ - if (cmd_ctx->session->ust_session && - cmd_ctx->session->ust_session->consumer) { - ret = cmd_set_consumer_uri(LTTNG_DOMAIN_UST, cmd_ctx->session, - nb_uri, uris); - } else if (cmd_ctx->session->kernel_session && - cmd_ctx->session->kernel_session->consumer) { - ret = cmd_set_consumer_uri(LTTNG_DOMAIN_KERNEL, - cmd_ctx->session, nb_uri, uris); - } - } - - free(uris); break; } @@ -4458,6 +4439,7 @@ static int set_option(int opt, const char *arg, const char *optname) ret = -1; } +end: if (ret == -EINVAL) { const char *opt_name = "unknown"; int i; @@ -4473,7 +4455,7 @@ static int set_option(int opt, const char *arg, const char *optname) WARN("Invalid argument provided for option \"%s\", using default value.", opt_name); } -end: + return ret; }