X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-events.cpp;h=6fb691be59f91d54e3c9107731ee9ee560670e30;hb=de5abcb02431896a1827dff5d3376e1f2e124cd7;hp=a93b4cb95975a90356b052bdfce798bffbfff504;hpb=6dcdb62c636ef8e6c8dae796d1197a0414fca9f7;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/notification-thread-events.cpp b/src/bin/lttng-sessiond/notification-thread-events.cpp index a93b4cb95..6fb691be5 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.cpp +++ b/src/bin/lttng-sessiond/notification-thread-events.cpp @@ -1107,13 +1107,12 @@ int evaluate_session_condition( } case LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED: { - const auto rotation_id = new_state ? - new_state->rotation.id : - session_info->last_state_sample.rotation.id; + const auto& sample = new_state ? *new_state : session_info->last_state_sample; + const auto rotation_id = sample.rotation.id; /* Callee acquires a reference to location. */ *evaluation = lttng_evaluation_session_rotation_completed_create( - rotation_id, new_state->rotation.location); + rotation_id, sample.rotation.location); break; } case LTTNG_CONDITION_TYPE_SESSION_CONSUMED_SIZE: @@ -2965,6 +2964,7 @@ int handle_notification_thread_command_register_trigger( client_list = notification_client_list_create(state, condition); if (!client_list) { ERR("Error creating notification client list for trigger %s", trigger->name); + ret = -1; goto error_free_ht_element; } }