#include <unistd.h>
#include <assert.h>
#include <inttypes.h>
+#include <fcntl.h>
#define CLIENT_POLL_MASK_IN (LPOLLIN | LPOLLERR | LPOLLHUP | LPOLLRDHUP)
#define CLIENT_POLL_MASK_IN_OUT (CLIENT_POLL_MASK_IN | LPOLLOUT)
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(
&iter);
node = cds_lfht_iter_get_node(&iter);
if (!node) {
+ free(client_list_element);
goto end_unlock;
}
return ret;
}
+static
int handle_notification_thread_command_unregister_trigger(
struct notification_thread_state *state,
struct lttng_trigger *trigger,
* 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);