Pass lttng_event struct to the set_filter API call
[lttng-tools.git] / src / bin / lttng-sessiond / cmd.c
index 386b99ae216504e86cf9225f300816791e4f4234..eab52342cc2f60ce32d87add0e60e350d8dbe680 100644 (file)
@@ -736,7 +736,7 @@ static int start_kernel_session(struct ltt_kernel_session *ksess, int wpipe)
        }
 
        /* Quiescent wait after starting trace */
-       kernel_wait_quiescent(wpipe);
+       kernel_wait_quiescent(kernel_tracer_fd);
 
        ksess->started = 1;
 
@@ -826,9 +826,6 @@ int cmd_enable_channel(struct ltt_session *session,
        {
                struct ltt_kernel_channel *kchan;
 
-               /* Mandatory for a kernel channel. */
-               assert(wpipe > 0);
-
                kchan = trace_kernel_get_channel_by_name(attr->name,
                                session->kernel_session);
                if (kchan == NULL) {
@@ -841,7 +838,7 @@ int cmd_enable_channel(struct ltt_session *session,
                        goto error;
                }
 
-               kernel_wait_quiescent(wpipe);
+               kernel_wait_quiescent(kernel_tracer_fd);
 
                /*
                 * If the session was previously started, start as well this newly
@@ -1038,8 +1035,7 @@ error:
  * Command LTTNG_ADD_CONTEXT processed by the client thread.
  */
 int cmd_add_context(struct ltt_session *session, int domain,
-               char *channel_name, char *event_name, struct lttng_event_context *ctx,
-               int kwpipe)
+               char *channel_name, struct lttng_event_context *ctx, int kwpipe)
 {
        int ret;
 
@@ -1056,8 +1052,7 @@ int cmd_add_context(struct ltt_session *session, int domain,
                }
 
                /* Add kernel context to kernel tracer */
-               ret = context_kernel_add(session->kernel_session, ctx,
-                               event_name, channel_name);
+               ret = context_kernel_add(session->kernel_session, ctx, channel_name);
                if (ret != LTTNG_OK) {
                        goto error;
                }
@@ -1086,8 +1081,7 @@ int cmd_add_context(struct ltt_session *session, int domain,
                        free(attr);
                }
 
-
-               ret = context_ust_add(usess, domain, ctx, event_name, channel_name);
+               ret = context_ust_add(usess, domain, ctx, channel_name);
                if (ret != LTTNG_OK) {
                        goto error;
                }
@@ -1113,7 +1107,7 @@ error:
  * Command LTTNG_SET_FILTER processed by the client thread.
  */
 int cmd_set_filter(struct ltt_session *session, int domain,
-               char *channel_name, char *event_name,
+               char *channel_name, struct lttng_event *event,
                struct lttng_filter_bytecode *bytecode)
 {
        int ret;
@@ -1126,7 +1120,7 @@ int cmd_set_filter(struct ltt_session *session, int domain,
        {
                struct ltt_ust_session *usess = session->ust_session;
 
-               ret = filter_ust_set(usess, domain, bytecode, event_name, channel_name);
+               ret = filter_ust_set(usess, domain, bytecode, event, channel_name);
                if (ret != LTTNG_OK) {
                        goto error;
                }
This page took 0.024162 seconds and 4 git commands to generate.