val = condition->threshold_ratio.value * (double) UINT32_MAX;
hash ^= hash_key_u64(&val, lttng_ht_seed);
- } else if (condition->threshold_ratio.set) {
+ } else if (condition->threshold_bytes.set) {
uint64_t val;
val = condition->threshold_bytes.value;
ret = evaluate_condition(condition, &evaluation, state, NULL,
last_sample, channel_info->capacity);
if (ret) {
- WARN("[notification-thread] Fatal error occured while evaluating a newly subscribed-to condition");
+ WARN("[notification-thread] Fatal error occurred while evaluating a newly subscribed-to condition");
goto end;
}
client, state)) {
WARN("[notification-thread] Evaluation of a condition on client subscription failed, aborting.");
ret = -1;
+ free(client_list_element);
goto end_unlock;
}
channels_ht_node) {
struct lttng_trigger_list_element *trigger_list_element;
struct lttng_channel_trigger_list *trigger_list;
+ struct cds_lfht_iter lookup_iter;
if (!trigger_applies_to_channel(trigger, channel)) {
continue;
hash_channel_key(&channel->key),
match_channel_trigger_list,
&channel->key,
- &iter);
- node = cds_lfht_iter_get_node(&iter);
+ &lookup_iter);
+ node = cds_lfht_iter_get_node(&lookup_iter);
assert(node);
trigger_list = caa_container_of(node,
struct lttng_channel_trigger_list,
struct notification_thread_command *cmd;
/* Read event_fd to put it back into a quiescent state. */
- ret = read(handle->cmd_queue.event_fd, &counter, sizeof(counter));
+ ret = read(lttng_pipe_get_readfd(handle->cmd_queue.event_pipe), &counter, sizeof(counter));
if (ret == -1) {
goto error;
}