Missing error handling: consumer_signal_init should return its error status
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index 4bfbb9ef4faa68e96e41afde465f2716e714bd6b..0b116e11820ff70ee483c132b2eef4215840a5d9 100644 (file)
@@ -3389,31 +3389,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;
        }
@@ -4464,6 +4445,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;
@@ -4479,7 +4461,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;
 }
 
This page took 0.025199 seconds and 5 git commands to generate.