- if (session->rotation_schedule_timer_enabled) {
- if (timer_session_rotation_schedule_timer_stop(
- session)) {
- ERR("Failed to stop the \"rotation schedule\" timer of session %s",
- session->name);
- }
- }
-
- /*
- * A rotation is still ongoing. The check timer will continue to wait
- * for the rotation to complete. When the rotation finally completes,
- * a check will be performed to rename the "active" chunk to the
- * expected "timestamp_begin-timestamp_end" format.
- */
- if (session->current_archive_id > 0 &&
- session->rotation_state != LTTNG_ROTATION_STATE_ONGOING) {
- ret = rename_active_chunk(session);
- if (ret) {
- /*
- * This error should not prevent the user from stopping
- * the session. However, it will be reported at the end.
- */
- error_occurred = true;
- }
- }
-