X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Flive.c;h=bafdf35ce90034a90e8ee0e9eaa1a8996103de9e;hb=9237e6a108fdba7acc014f739d0569565552bdec;hp=2972a500f13f860f21b7e8422bdcbc2e0dd17c31;hpb=2160c3c77dd1285327c69cdaf3c589aea7233396;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c index 2972a500f..bafdf35ce 100644 --- a/src/bin/lttng-relayd/live.c +++ b/src/bin/lttng-relayd/live.c @@ -313,6 +313,18 @@ int make_viewer_streams(struct relay_session *session, if (!stream->published) { goto next; } + /* + * Stream has no data, don't consider it yet. + */ + if (stream->is_metadata) { + if (!stream->metadata_received) { + goto next; + } + } else { + if (stream->prev_seq == -1ULL) { + goto next; + } + } vstream = viewer_stream_get_by_id(stream->stream_handle); if (!vstream) { vstream = viewer_stream_create(stream, seek_t); @@ -1442,9 +1454,11 @@ send_reply: } health_code_update(); - DBG("Index %" PRIu64 " for stream %" PRIu64 " sent", - vstream->last_sent_index, - vstream->stream->stream_handle); + if (vstream) { + DBG("Index %" PRIu64 " for stream %" PRIu64 " sent", + vstream->last_sent_index, + vstream->stream->stream_handle); + } end: if (metadata_viewer_stream) { viewer_stream_put(metadata_viewer_stream);