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:53 +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 1aff9ec75c579dbf6a1a16e0929d2c01c8c404bc..992ba58f2a96200650924dd6d0856b513b6eb529 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.027677 seconds and 4 git commands to generate.