X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-events.c;h=f54141e73b2a14341b1bd1610db5e8400daeb530;hb=88c6cf5e08792a86853a27b94944dc9df1d3a330;hp=327ea7fc34907119cde2662bb42ee34262179f5c;hpb=800c5e109dd3f8052ec4d3f53c0b54d8d4e36df1;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 327ea7fc3..f54141e73 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -295,7 +295,7 @@ unsigned long lttng_condition_buffer_usage_hash( 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; @@ -469,7 +469,7 @@ int evaluate_condition_for_client(struct lttng_trigger *trigger, 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; } @@ -565,6 +565,7 @@ int notification_thread_client_subscribe(struct notification_client *client, client, state)) { WARN("[notification-thread] Evaluation of a condition on client subscription failed, aborting."); ret = -1; + free(client_list_element); goto end_unlock; } @@ -1118,6 +1119,7 @@ int handle_notification_thread_command_register_trigger( 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; @@ -1127,8 +1129,8 @@ int handle_notification_thread_command_register_trigger( 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,