Fix: only consumerd should print errors
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 6 Mar 2013 01:56:05 +0000 (20:56 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 6 Mar 2013 01:56:05 +0000 (20:56 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libringbuffer/ring_buffer_frontend.c

index 76f369e9bc7bbee03faf55627c254855ddf54f40..a01ebbbf8ae8931a937dac9c4a7ec19ba29ea4c8 100644 (file)
@@ -612,7 +612,6 @@ static void channel_print_errors(struct channel *chan,
 static void channel_free(struct channel *chan,
                struct lttng_ust_shm_handle *handle)
 {
-       channel_print_errors(chan, handle);
        channel_backend_free(&chan->backend, handle);
        /* chan is freed by shm teardown */
        shm_object_table_destroy(handle->table);
@@ -830,6 +829,10 @@ void channel_destroy(struct channel *chan, struct lttng_ust_shm_handle *handle,
                 * switching the buffers.
                 */
                channel_unregister_notifiers(chan, handle);
+               /*
+                * The consumer prints errors.
+                */
+               channel_print_errors(chan, handle);
        }
 
        /*
This page took 0.034224 seconds and 4 git commands to generate.