notification: add/remove tracer event source
[lttng-tools.git] / src / bin / lttng-sessiond / notification-thread.c
index 0c2d0d294628e2aea442498592ec1f379b15727a..917cec5a2500f56f8f12350b74db94e423dc6928 100644 (file)
@@ -134,6 +134,7 @@ struct notification_thread_handle *notification_thread_handle_create(
        } else {
                handle->channel_monitoring_pipes.kernel_consumer = -1;
        }
+
 end:
        return handle;
 error:
@@ -378,6 +379,9 @@ void fini_thread_state(struct notification_thread_state *state)
                notification_channel_socket_destroy(
                                state->notification_channel_socket);
        }
+
+       assert(cds_list_empty(&state->tracer_event_sources_list));
+
        if (state->executor) {
                action_executor_destroy(state->executor);
        }
@@ -407,6 +411,7 @@ int init_thread_state(struct notification_thread_handle *handle,
 
        memset(state, 0, sizeof(*state));
        state->notification_channel_socket = -1;
+       state->trigger_id.next_tracer_token = 1;
        lttng_poll_init(&state->events);
 
        ret = notification_channel_socket_create();
@@ -485,6 +490,8 @@ int init_thread_state(struct notification_thread_handle *handle,
                goto error;
        }
 
+       CDS_INIT_LIST_HEAD(&state->tracer_event_sources_list);
+
        state->executor = action_executor_create(handle);
        if (!state->executor) {
                goto error;
This page took 0.023456 seconds and 4 git commands to generate.