X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-events.c;h=f437d018b3fdd493e12465e1b121f705784eece8;hb=9e0bb80e5e06934fe204d77227af31aea38aa323;hp=98757737dbfd2d13357d62f0c2a20a5b45683163;hpb=9b63a4aa352c184984395c097f86d5e54c295012;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 98757737d..f437d018b 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -51,7 +51,8 @@ #define CLIENT_POLL_MASK_IN_OUT (CLIENT_POLL_MASK_IN | LPOLLOUT) struct lttng_trigger_list_element { - struct lttng_trigger *trigger; + /* No ownership of the trigger object is assumed. */ + const struct lttng_trigger *trigger; struct cds_list_head node; }; @@ -294,12 +295,15 @@ static unsigned long lttng_condition_buffer_usage_hash( const struct lttng_condition *_condition) { - unsigned long hash = 0; + unsigned long hash; + unsigned long condition_type; struct lttng_condition_buffer_usage *condition; condition = container_of(_condition, struct lttng_condition_buffer_usage, parent); + condition_type = (unsigned long) condition->parent.type; + hash = hash_key_ulong((void *) condition_type, lttng_ht_seed); if (condition->session_name) { hash ^= hash_key_str(condition->session_name, lttng_ht_seed); } @@ -329,13 +333,16 @@ static unsigned long lttng_condition_session_consumed_size_hash( const struct lttng_condition *_condition) { - unsigned long hash = 0; + unsigned long hash; + unsigned long condition_type = + (unsigned long) LTTNG_CONDITION_TYPE_SESSION_CONSUMED_SIZE; struct lttng_condition_session_consumed_size *condition; uint64_t val; condition = container_of(_condition, struct lttng_condition_session_consumed_size, parent); + hash = hash_key_ulong((void *) condition_type, lttng_ht_seed); if (condition->session_name) { hash ^= hash_key_str(condition->session_name, lttng_ht_seed); } @@ -344,6 +351,7 @@ unsigned long lttng_condition_session_consumed_size_hash( return hash; } + /* * The lttng_condition hashing code is kept in this file (rather than * condition.c) since it makes use of GPLv2 code (hashtable utils), which we