X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Frotation-thread.c;fp=src%2Fbin%2Flttng-sessiond%2Frotation-thread.c;h=ee25baaf1964d8d5a1809a2e1bfc53f5f723d1df;hp=05627f9345d6151e28db2a3534a99c9f1b5d08b9;hb=dc1d59677f2e7686dc33b095663b95eb1ccf89e6;hpb=6ae1bf4602f7bfd3a1a206aaf98295191cef5082 diff --git a/src/bin/lttng-sessiond/rotation-thread.c b/src/bin/lttng-sessiond/rotation-thread.c index 05627f934..ee25baaf1 100644 --- a/src/bin/lttng-sessiond/rotation-thread.c +++ b/src/bin/lttng-sessiond/rotation-thread.c @@ -467,6 +467,11 @@ int check_session_rotation_pending(struct ltt_session *session, const char *archived_chunk_name; uint64_t chunk_being_archived_id; + if (!session->chunk_being_archived) { + ret = 0; + goto end; + } + chunk_status = lttng_trace_chunk_get_id(session->chunk_being_archived, &chunk_being_archived_id); assert(chunk_status == LTTNG_TRACE_CHUNK_STATUS_OK); @@ -474,11 +479,6 @@ int check_session_rotation_pending(struct ltt_session *session, DBG("[rotation-thread] Checking for pending rotation on session \"%s\", trace archive %" PRIu64, session->name, chunk_being_archived_id); - if (!session->chunk_being_archived) { - ret = 0; - goto end; - } - /* * The rotation-pending check timer of a session is launched in * one-shot mode. If the rotation is incomplete, the rotation