X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fevent.c;h=189236beb1171a05ba21e89b3ecb51216a7b5e47;hp=f32db4429d0333b28f5b25f2967130c10bc6a5a3;hb=ae0a823f9f7e1d3800479488a58efc2f92f27d89;hpb=df4f5a87a21110a5f9447bcfd7ffeb25098a5fd4 diff --git a/src/bin/lttng-sessiond/event.c b/src/bin/lttng-sessiond/event.c index f32db4429..189236beb 100644 --- a/src/bin/lttng-sessiond/event.c +++ b/src/bin/lttng-sessiond/event.c @@ -1,19 +1,9 @@ /* - * Copyright (C) 2011 - David Goulet - * Copyright (C) 2016 - Jérémie Galarneau + * Copyright (C) 2011 David Goulet + * Copyright (C) 2016 Jérémie Galarneau * - * 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 @@ -31,7 +21,8 @@ #include "event.h" #include "kernel.h" #include "lttng-sessiond.h" -#include "ust-ctl.h" +#include "lttng-ust-ctl.h" +#include "lttng-ust-error.h" #include "ust-app.h" #include "trace-kernel.h" #include "trace-ust.h" @@ -511,10 +502,12 @@ int event_agent_enable(struct ltt_ust_session *usess, filter = NULL; filter_expression = NULL; created = 1; + assert(!aevent->enabled); } - if (created && filter) { - ret = add_filter_app_ctx(filter, filter_expression, agt); + if (created && aevent->filter) { + ret = add_filter_app_ctx( + aevent->filter, aevent->filter_expression, agt); if (ret != LTTNG_OK) { goto error; }