Fix: consumerd: incorrect clear logging statement
[lttng-tools.git] / src / common / consumer / consumer.c
index 26209279ee65a49ec8c06ba88baed8dd275da90e..4613284a8d5d6c29afd0c0fa17a725037c0b2f66 100644 (file)
@@ -1,20 +1,10 @@
 /*
- * Copyright (C) 2011 Julien Desfossez <julien.desfossez@polymtl.ca>
- *                      Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *               2012 - David Goulet <dgoulet@efficios.com>
+ * Copyright (C) 2011 Julien Desfossez <julien.desfossez@polymtl.ca>
+ * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2012 David Goulet <dgoulet@efficios.com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2 only,
- * as published by the Free Software Foundation.
+ * SPDX-License-Identifier: GPL-2.0-only
  *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #define _LGPL_SOURCE
@@ -4203,7 +4193,7 @@ int consumer_clear_buffer(struct lttng_consumer_stream *stream)
        case LTTNG_CONSUMER_KERNEL:
                ret = kernctl_buffer_clear(stream->wait_fd);
                if (ret < 0) {
-                       ERR("Failed to flush kernel stream");
+                       ERR("Failed to clear kernel stream (ret = %d)", ret);
                        goto end;
                }
                break;
@@ -4282,11 +4272,6 @@ error_unlock:
        pthread_mutex_unlock(&stream->lock);
        pthread_mutex_unlock(&channel->lock);
        rcu_read_unlock();
-       if (ret) {
-               goto error;
-       }
-       ret = LTTCOMM_CONSUMERD_SUCCESS;
-error:
        return ret;
 }
 
@@ -4603,7 +4588,7 @@ enum lttcomm_return_code lttng_consumer_create_trace_chunk(
         * and LTTNG_CONSUMER_DESTROY_TRACE_CHUNK commands.
         */
        created_chunk = lttng_trace_chunk_create(chunk_id,
-                       chunk_creation_timestamp);
+                       chunk_creation_timestamp, NULL);
        if (!created_chunk) {
                ERR("Failed to create trace chunk");
                ret_code = LTTCOMM_CONSUMERD_CREATE_TRACE_CHUNK_FAILED;
This page took 0.031704 seconds and 4 git commands to generate.