Fix: only flush non-metadata channels
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 20 May 2016 01:31:07 +0000 (21:31 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 20 May 2016 01:34:12 +0000 (21:34 -0400)
Issue introduced by commit
"Fix: do not generate packet at destroy after stop".

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-events.c

index c129767469db48ebc3880496a0bf2fa0e7249dea..8befa34f7ad6f4d5dc7d676adf4b40709d5ef814 100644 (file)
@@ -189,8 +189,10 @@ int lttng_session_enable(struct lttng_session *session)
        }
 
        /* Clear each stream's quiescent state. */
-       list_for_each_entry(chan, &session->chan, list)
-               lib_ring_buffer_clear_quiescent_channel(chan->chan);
+       list_for_each_entry(chan, &session->chan, list) {
+               if (chan->channel_type != METADATA_CHANNEL)
+                       lib_ring_buffer_clear_quiescent_channel(chan->chan);
+       }
 
        ACCESS_ONCE(session->active) = 1;
        ACCESS_ONCE(session->been_active) = 1;
@@ -220,8 +222,10 @@ int lttng_session_disable(struct lttng_session *session)
        ACCESS_ONCE(session->active) = 0;
 
        /* Set each stream's quiescent state. */
-       list_for_each_entry(chan, &session->chan, list)
-               lib_ring_buffer_set_quiescent_channel(chan->chan);
+       list_for_each_entry(chan, &session->chan, list) {
+               if (chan->channel_type != METADATA_CHANNEL)
+                       lib_ring_buffer_set_quiescent_channel(chan->chan);
+       }
 
 end:
        mutex_unlock(&sessions_mutex);
This page took 0.027517 seconds and 4 git commands to generate.