Fix: handle kernel event type correctly on enable
[lttng-tools.git] / src / bin / lttng-sessiond / cmd.c
index 1fd799f0d819e375fdc05e672dfec14cccc275e6..2a1bfb5f4670110e24ffab931f085dac4ed57f0c 100644 (file)
@@ -1462,6 +1462,9 @@ int cmd_enable_event(struct ltt_session *session, struct lttng_domain *domain,
 
                switch (event->type) {
                case LTTNG_EVENT_ALL:
+               case LTTNG_EVENT_PROBE:
+               case LTTNG_EVENT_FUNCTION:
+               case LTTNG_EVENT_FUNCTION_ENTRY:
                case LTTNG_EVENT_TRACEPOINT:
                        ret = event_kernel_enable_tracepoint(kchan, event);
                        if (ret != LTTNG_OK) {
@@ -3055,6 +3058,7 @@ int cmd_snapshot_record(struct ltt_session *session,
        uint64_t session_max_size = 0, max_stream_size = 0;
 
        assert(session);
+       assert(output);
 
        DBG("Cmd snapshot record for session %s", session->name);
 
@@ -3074,7 +3078,7 @@ int cmd_snapshot_record(struct ltt_session *session,
        }
 
        /* Use temporary output for the session. */
-       if (output && *output->ctrl_url != '\0') {
+       if (*output->ctrl_url != '\0') {
                ret = snapshot_output_init(output->max_size, output->name,
                                output->ctrl_url, output->data_url, session->consumer,
                                &tmp_output, NULL);
This page took 0.024593 seconds and 4 git commands to generate.