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:31:07 +0000 (21:31 -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 f2a9a8a58498f1f1a833e8ec1b97e76093391982..928886f3f9fdf0b2f1f993e13290288b618f3ae9 100644 (file)
@@ -244,8 +244,10 @@ int lttng_session_enable(struct lttng_session *session)
        lttng_session_sync_enablers(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;
@@ -279,8 +281,10 @@ int lttng_session_disable(struct lttng_session *session)
        lttng_session_sync_enablers(session);
 
        /* 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);
        return ret;
This page took 0.027134 seconds and 5 git commands to generate.