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:32:49 +0000 (21:32 -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 6b74f6e850ac0868c6f3373dffeb2df88a369b7b..400c5ecab71cc1111df83280f8588195a983963a 100644 (file)
@@ -240,8 +240,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;
@@ -275,8 +277,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.028791 seconds and 4 git commands to generate.