- ret = make_viewer_streams(session, LTTNG_VIEWER_SEEK_LAST, &nb_total, &nb_unsent,
+ pthread_mutex_lock(&session->lock);
+ if (!conn->viewer_session->current_trace_chunk &&
+ session->current_trace_chunk) {
+ ret = viewer_session_set_trace_chunk(conn->viewer_session,
+ session->current_trace_chunk);
+ if (ret) {
+ goto error_unlock_session;
+ }
+ }
+ ret = make_viewer_streams(session,
+ conn->viewer_session->current_trace_chunk,
+ LTTNG_VIEWER_SEEK_LAST, &nb_total, &nb_unsent,