X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-events.c;h=d04d3c2c1b89791f15a7adebfa2f0da474756c98;hp=bddede988e3edb6b5f8fa98613892c542f503b9d;hb=a8393880b8f7a203b004f3667ebc57941e9048a9;hpb=ea9a44f03f3f6e144b5f7f312eee2a5f7a849ecb diff --git a/src/bin/lttng-sessiond/notification-thread-events.c b/src/bin/lttng-sessiond/notification-thread-events.c index bddede988..d04d3c2c1 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -414,6 +414,21 @@ unsigned long lttng_condition_session_consumed_size_hash( return hash; } +static +unsigned long lttng_condition_session_rotation_hash( + const struct lttng_condition *_condition) +{ + unsigned long hash, condition_type; + struct lttng_condition_session_rotation *condition; + + condition = container_of(_condition, + struct lttng_condition_session_rotation, parent); + condition_type = (unsigned long) condition->parent.type; + hash = hash_key_ulong((void *) condition_type, lttng_ht_seed); + assert(condition->session_name); + hash ^= hash_key_str(condition->session_name, lttng_ht_seed); + return hash; +} /* * The lttng_condition hashing code is kept in this file (rather than @@ -429,6 +444,9 @@ unsigned long lttng_condition_hash(const struct lttng_condition *condition) return lttng_condition_buffer_usage_hash(condition); case LTTNG_CONDITION_TYPE_SESSION_CONSUMED_SIZE: return lttng_condition_session_consumed_size_hash(condition); + case LTTNG_CONDITION_TYPE_SESSION_ROTATION_ONGOING: + case LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED: + return lttng_condition_session_rotation_hash(condition); default: ERR("[notification-thread] Unexpected condition type caught"); abort();