Revert "sessiond: trigger: run trigger actions through an action executor"
[lttng-tools.git] / src / bin / lttng-sessiond / event.c
index f32db4429d0333b28f5b25f2967130c10bc6a5a3..189236beb1171a05ba21e89b3ecb51216a7b5e47 100644 (file)
@@ -1,19 +1,9 @@
 /*
- * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
- * Copyright (C) 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
+ * Copyright (C) 2016 Jérémie Galarneau <jeremie.galarneau@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
@@ -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;
                }
This page took 0.024052 seconds and 5 git commands to generate.