X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer.c;h=4613284a8d5d6c29afd0c0fa17a725037c0b2f66;hp=26209279ee65a49ec8c06ba88baed8dd275da90e;hb=96393977613193a0e28343ea32a60c819a00e726;hpb=f8528c7a982be6612eb1d81f17e1badd8910dfd4 diff --git a/src/common/consumer/consumer.c b/src/common/consumer/consumer.c index 26209279e..4613284a8 100644 --- a/src/common/consumer/consumer.c +++ b/src/common/consumer/consumer.c @@ -1,20 +1,10 @@ /* - * Copyright (C) 2011 - Julien Desfossez - * Mathieu Desnoyers - * 2012 - David Goulet + * Copyright (C) 2011 Julien Desfossez + * Copyright (C) 2011 Mathieu Desnoyers + * Copyright (C) 2012 David Goulet * - * 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;