Fix: only set the new_streams flag if a viewer is attached
authorJulien Desfossez <jdesfossez@efficios.com>
Mon, 10 Feb 2014 23:52:29 +0000 (18:52 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 11 Feb 2014 21:13:32 +0000 (16:13 -0500)
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-relayd/main.c

index 482ca3e758a334052676fb5e823ed3dc5c6bc56a..b76d078800847cfc8b18db032736c4e1a535ca7d 100644 (file)
@@ -2033,7 +2033,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.027942 seconds and 4 git commands to generate.