* Return codes for lttng_rotation_handle_get_state()
*/
enum lttng_rotation_state {
+ /*
+ * Session has not been rotated.
+ */
+ LTTNG_ROTATION_STATE_NO_ROTATION = 0,
/*
* Rotation is ongoing, but has not been completed yet.
*/
- LTTNG_ROTATION_STATE_ONGOING = 0,
+ LTTNG_ROTATION_STATE_ONGOING = 1,
/*
* Rotation has been completed and the resulting chunk
* can now safely be read.
*/
- LTTNG_ROTATION_STATE_COMPLETED = 1,
+ LTTNG_ROTATION_STATE_COMPLETED = 2,
/*
* The rotation has expired.
*
* Note that this state does not guarantee the the rotation was
* completed successfully.
*/
- LTTNG_ROTATION_STATE_EXPIRED = 2,
+ LTTNG_ROTATION_STATE_EXPIRED = 3,
/*
* The rotation could not be completed due to an error.
*/
- LTTNG_ROTATION_STATE_ERROR = 3,
+ LTTNG_ROTATION_STATE_ERROR = 4,
};
enum lttng_rotation_status {
}
new_session->rotate_pending = false;
+ new_session->rotation_state = LTTNG_ROTATION_STATE_NO_ROTATION;
new_session->rotate_pending_relay = false;
new_session->rotate_relay_pending_timer_enabled = false;
new_session->rotate_timer = false;