sessiond: notification: maintain an id to notification_client ht
[lttng-tools.git] / src / bin / lttng-sessiond / notification-thread.c
index 7dadb2c6748a7ae6738dad9294144407996a4d0d..c964e7c910b062a82753c50c58b78d728a9454c1 100644 (file)
@@ -332,6 +332,10 @@ void fini_thread_state(struct notification_thread_state *state)
                ret = cds_lfht_destroy(state->client_socket_ht, NULL);
                assert(!ret);
        }
+       if (state->client_id_ht) {
+               ret = cds_lfht_destroy(state->client_id_ht, NULL);
+               assert(!ret);
+       }
        if (state->triggers_ht) {
                ret = handle_notification_thread_trigger_unregister_all(state);
                assert(!ret);
@@ -424,6 +428,12 @@ int init_thread_state(struct notification_thread_handle *handle,
                goto error;
        }
 
+       state->client_id_ht = cds_lfht_new(DEFAULT_HT_SIZE, 1, 0,
+                       CDS_LFHT_AUTO_RESIZE | CDS_LFHT_ACCOUNTING, NULL);
+       if (!state->client_id_ht) {
+               goto error;
+       }
+
        state->channel_triggers_ht = cds_lfht_new(DEFAULT_HT_SIZE, 1, 0,
                        CDS_LFHT_AUTO_RESIZE | CDS_LFHT_ACCOUNTING, NULL);
        if (!state->channel_triggers_ht) {
This page took 0.022941 seconds and 4 git commands to generate.