+ switch (rotation_state) {
+ case LTTNG_ROTATION_STATE_NO_ROTATION:
+ break;
+ case LTTNG_ROTATION_STATE_COMPLETED:
+ {
+ const struct lttng_trace_archive_location *location;
+
+ status = lttng_destruction_handle_get_archive_location(
+ handle, &location);
+ if (status == LTTNG_DESTRUCTION_HANDLE_STATUS_OK) {
+ ret = print_trace_archive_location(
+ location, session->name);
+ if (ret) {
+ ERR("%sFailed to print the location of trace archive",
+ newline_needed ? "\n" : "");
+ newline_needed = false;
+ goto skip_wait_rotation;
+ }
+ break;
+ }
+ /* fall-through. */
+ }
+ default:
+ ERR("%sFailed to get the location of the rotation performed during the session's destruction",
+ newline_needed ? "\n" : "");
+ newline_needed = false;
+ goto skip_wait_rotation;
+ }
+skip_wait_rotation:
+ MSG("%sSession %s destroyed", newline_needed ? "\n" : "",
+ session->name);
+ newline_needed = false;
+ if (stats_str) {
+ MSG("%s", stats_str);
+ }
+
+ session_name = get_session_name_quiet();
+ if (session_name && !strncmp(session->name, session_name, NAME_MAX)) {
+ config_destroy_default();
+ }
+
+ if (lttng_opt_mi) {
+ ret = mi_lttng_session(writer, session, 0);
+ if (ret) {
+ ret = CMD_ERROR;
+ goto error;
+ }