From: Mathieu Desnoyers Date: Tue, 25 Aug 2015 13:26:30 +0000 (-0400) Subject: Fix: relayd: don't check for new streams in get packet X-Git-Tag: v2.8.0-rc1~413 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=48e6cb13aaf1dc3875ac7ba9543649ea301ef20a;p=lttng-tools.git Fix: relayd: don't check for new streams in get packet Only needed in get next index. Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c index 096c855f6..57ff9197a 100644 --- a/src/bin/lttng-relayd/live.c +++ b/src/bin/lttng-relayd/live.c @@ -1535,23 +1535,6 @@ int viewer_get_packet(struct relay_connection *conn) } pthread_mutex_lock(&vstream->stream->lock); - /* - * The vstream->stream_fd used here has been opened by - * get_next_index. It is opened there because this is what - * allows us to grab a reference to the file with stream lock - * held, thus protecting us against overwrite caused by - * tracefile rotation. Since tracefile rotation unlinks the old - * data file, we are ensured that we won't have our data - * overwritten under us. - */ - ret = check_new_streams(conn); - if (ret < 0) { - goto end_free; - } else if (ret == 1) { - reply.status = htobe32(LTTNG_VIEWER_GET_PACKET_ERR); - reply.flags |= LTTNG_VIEWER_FLAG_NEW_STREAM; - goto send_reply; - } len = be32toh(get_packet_info.len); data = zmalloc(len);