projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: do not repurpose iterator while it is being used
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
notification-thread-events.c
diff --git
a/src/bin/lttng-sessiond/notification-thread-events.c
b/src/bin/lttng-sessiond/notification-thread-events.c
index 327ea7fc34907119cde2662bb42ee34262179f5c..f54141e73b2a14341b1bd1610db5e8400daeb530 100644
(file)
--- 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);
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;
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) {
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 occur
r
ed while evaluating a newly subscribed-to condition");
goto end;
}
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;
client, state)) {
WARN("[notification-thread] Evaluation of a condition on client subscription failed, aborting.");
ret = -1;
+ free(client_list_element);
goto end_unlock;
}
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;
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;
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,
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,
assert(node);
trigger_list = caa_container_of(node,
struct lttng_channel_trigger_list,
This page took
0.025004 seconds
and
4
git commands to generate.