X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fclear.c;h=3ae70ea2fa5fd462d38e816a9328c58aaebc8081;hp=38f4796dc6008ea889d6fc3840fa3f59c926ee67;hb=505b2d90aa87592186ecc2a119cf67fb3f90d168;hpb=022349df3783b538b41cf4a3cd55e7b231603bdd diff --git a/src/bin/lttng-sessiond/clear.c b/src/bin/lttng-sessiond/clear.c index 38f4796dc..3ae70ea2f 100644 --- a/src/bin/lttng-sessiond/clear.c +++ b/src/bin/lttng-sessiond/clear.c @@ -1,18 +1,8 @@ /* - * Copyright (C) 2019 - Jonathan Rajotte + * Copyright (C) 2019 Jonathan Rajotte * - * 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 @@ -204,6 +194,16 @@ int cmd_clear_session(struct ltt_session *session, int *sock_fd) goto end; } } + + /* + * Open a packet in every stream of the session to ensure that + * viewers can correctly identify the boundaries of the periods + * during which tracing was active for this session. + */ + ret = session_open_packets(session); + if (ret != LTTNG_OK) { + goto end; + } } ret = LTTNG_OK; end: