fflush(stdout);
}
- usleep(DEFAULT_DATA_AVAILABILITY_WAIT_TIME);
+ usleep(DEFAULT_DATA_AVAILABILITY_WAIT_TIME_US);
_MSG(".");
fflush(stdout);
}
do {
status = lttng_destruction_handle_wait_for_completion(handle,
- DEFAULT_DATA_AVAILABILITY_WAIT_TIME);
+ DEFAULT_DATA_AVAILABILITY_WAIT_TIME_US / USEC_PER_MSEC);
switch (status) {
case LTTNG_DESTRUCTION_HANDLE_STATUS_TIMEOUT:
if (!printed_wait_msg) {
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;
skip_wait_rotation:
MSG("%sSession \"%s\" destroyed", printed_wait_msg ? "\n" : "",
session->name);
+ printed_wait_msg = false;
session_name = get_session_name_quiet();
if (session_name && !strncmp(session->name, session_name, NAME_MAX)) {
ret = CMD_SUCCESS;
error:
+ if (printed_wait_msg) {
+ MSG("");
+ }
lttng_destruction_handle_destroy(handle);
free(session_name);
return ret;