While the use of the destruction handle in the lttng client guarantees
that obtaining the rotation's state will succeed, it is a poor example
to give of using this API. Moreover, we don't wait to give the
impression that this could never change.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
status = lttng_destruction_handle_get_rotation_state(handle,
&rotation_state);
+ if (status != LTTNG_DESTRUCTION_HANDLE_STATUS_OK) {
+ ERR("Failed to get rotation state from destruction handle");
+ goto skip_wait_rotation;
+ }
switch (rotation_state) {
case LTTNG_ROTATION_STATE_NO_ROTATION:
break;