Fix: relayd: unbalanced RCU read-side lock/unlock
[lttng-tools.git] / src / bin / lttng-relayd / live.c
index d8517d2f6b14ed8a8e58668a90d282020fbff19c..29217b151b582ba297b160fbf75dd2146cafd6b1 100644 (file)
@@ -1206,6 +1206,7 @@ static int check_index_status(struct relay_viewer_stream *vstream,
                                 */
                                index->status = htobe32(LTTNG_VIEWER_INDEX_INACTIVE);
                                index->timestamp_end = htobe64(rstream->beacon_ts_end);
+                               index->stream_id = htobe64(rstream->ctf_stream_id);
                                goto index_ready;
                        } else if (rstream->total_index_received <= vstream->last_sent_index
                                        && !vstream->close_write_flag) {
@@ -1319,7 +1320,7 @@ int viewer_get_next_index(struct relay_connection *conn)
        ret = check_index_status(vstream, rstream, ctf_trace, &viewer_index);
        pthread_mutex_unlock(&rstream->viewer_stream_rotation_lock);
        if (ret < 0) {
-               goto end;
+               goto end_unlock;
        } else if (ret == 1) {
                /*
                 * This means the viewer index data structure has been populated by the
This page took 0.023895 seconds and 4 git commands to generate.