Cleanup: remove logically dead code
[lttng-ust.git] / liblttng-ust / lttng-events.c
index e4faf605e6e0eb1d5642fc5dea1b2d4bd0ae5946..4bd2b9375a40c2420209bd4e96f734e56c802577 100644 (file)
@@ -45,7 +45,7 @@
 
 #include <usterr-signal-safe.h>
 #include <helper.h>
-#include <ust-ctl.h>
+#include <lttng/ust-ctl.h>
 #include <ust-comm.h>
 #include "error.h"
 #include "compat.h"
@@ -106,8 +106,6 @@ int lttng_loglevel_match(int loglevel,
                enum lttng_ust_loglevel_type req_type,
                int req_loglevel)
 {
-       if (req_type == LTTNG_UST_LOGLEVEL_ALL)
-               return 1;
        if (!has_loglevel)
                loglevel = TRACE_DEFAULT;
        switch (req_type) {
@@ -260,7 +258,7 @@ int lttng_session_enable(struct lttng_session *session)
         */
        cds_list_for_each_entry(chan, &session->chan_head, node) {
                const struct lttng_ctx *ctx;
-               const struct lttng_event_field *fields = NULL;
+               const struct lttng_ctx_field *fields = NULL;
                size_t nr_fields = 0;
                uint32_t chan_id;
 
@@ -270,7 +268,7 @@ int lttng_session_enable(struct lttng_session *session)
                ctx = chan->ctx;
                if (ctx) {
                        nr_fields = ctx->nr_fields;
-                       fields = &ctx->fields->event_field;
+                       fields = ctx->fields;
                }
                ret = ustcomm_register_channel(notify_socket,
                        session->objd,
@@ -740,6 +738,8 @@ int lttng_attach_context(struct lttng_ust_context *context_param,
                return lttng_add_vpid_to_ctx(ctx);
        case LTTNG_UST_CONTEXT_PROCNAME:
                return lttng_add_procname_to_ctx(ctx);
+       case LTTNG_UST_CONTEXT_IP:
+               return lttng_add_ip_to_ctx(ctx);
        default:
                return -EINVAL;
        }
This page took 0.023812 seconds and 4 git commands to generate.