X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-events.c;h=4107bec96c541c6f60b5afed416f8a9f4c0b4bdf;hb=d53ea4e443912f7b3fe89da38e3374db2a1a3bf8;hp=7de6595d8e51db3f6306eda112d493c7da0494b7;hpb=ab0ee2ca29394fa28284b94cc3c598960660404f;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/notification-thread-events.c b/src/bin/lttng-sessiond/notification-thread-events.c index 7de6595d8..4107bec96 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -40,6 +40,7 @@ #include #include #include +#include #define CLIENT_POLL_MASK_IN (LPOLLIN | LPOLLERR | LPOLLHUP | LPOLLRDHUP) #define CLIENT_POLL_MASK_IN_OUT (CLIENT_POLL_MASK_IN | LPOLLOUT) @@ -258,7 +259,7 @@ unsigned long lttng_condition_buffer_usage_hash( hash ^= hash_key_str(condition->session_name, lttng_ht_seed); } if (condition->channel_name) { - hash ^= hash_key_str(condition->session_name, lttng_ht_seed); + hash ^= hash_key_str(condition->channel_name, lttng_ht_seed); } if (condition->domain.set) { hash ^= hash_key_ulong( @@ -405,6 +406,7 @@ int notification_thread_client_subscribe(struct notification_client *client, &iter); node = cds_lfht_iter_get_node(&iter); if (!node) { + free(client_list_element); goto end_unlock; } @@ -1948,9 +1950,7 @@ int handle_notification_thread_channel_sample( * The monitoring pipe only holds messages smaller than PIPE_BUF, * ensuring that read/write of sampling messages are atomic. */ - do { - ret = read(pipe, &sample_msg, sizeof(sample_msg)); - } while (ret == -1 && errno == EINTR); + ret = lttng_read(pipe, &sample_msg, sizeof(sample_msg)); if (ret != sizeof(sample_msg)) { ERR("[notification-thread] Failed to read from monitoring pipe (fd = %i)", pipe);