Fix: add missing VALGRIND ifdef checks and documentation
[lttng-tools.git] / src / bin / lttng-relayd / main.c
index 482ca3e758a334052676fb5e823ed3dc5c6bc56a..f6b23eb928a9137ae5eb939dc8c9efa4a892c81b 100644 (file)
@@ -1966,17 +1966,6 @@ int relay_recv_index(struct lttcomm_relayd_hdr *recv_hdr,
 
        /* Do we have a writable ready index to write on disk. */
        if (wr_index) {
-               /* Starting at 2.4, create the index file if none available. */
-               if (conn->minor >= 4 && stream->index_fd < 0) {
-                       ret = index_create_file(stream->path_name, stream->channel_name,
-                                       relayd_uid, relayd_gid, stream->tracefile_size,
-                                       stream->tracefile_count_current);
-                       if (ret < 0) {
-                               goto end_rcu_unlock;
-                       }
-                       stream->index_fd = ret;
-               }
-
                ret = relay_index_write(wr_index->fd, wr_index);
                if (ret < 0) {
                        goto end_rcu_unlock;
@@ -2033,7 +2022,9 @@ int relay_streams_sent(struct lttcomm_relayd_hdr *recv_hdr,
        /*
         * Inform the viewer that there are new streams in the session.
         */
-       uatomic_set(&conn->session->new_streams, 1);
+       if (conn->session->viewer_refcount) {
+               uatomic_set(&conn->session->new_streams, 1);
+       }
 
        reply.ret_code = htobe32(LTTNG_OK);
        send_ret = conn->sock->ops->sendmsg(conn->sock, &reply, sizeof(reply), 0);
This page took 0.027123 seconds and 5 git commands to generate.