X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcommon%2Fevaluation.c;h=2e098900c6ebf2a8166b0c4ef3ad6f3e17417fb3;hb=d3a684eebfe788a7527368d65d7f020bdd1e61d9;hp=91d5c0b1d8de7edbe397449784a264c873f9b923;hpb=c19092cd4d6af49c38322fc55ca91f17f03f32ac;p=deliverable%2Flttng-tools.git diff --git a/src/common/evaluation.c b/src/common/evaluation.c index 91d5c0b1d..2e098900c 100644 --- a/src/common/evaluation.c +++ b/src/common/evaluation.c @@ -1,24 +1,15 @@ /* - * Copyright (C) 2017 - Jérémie Galarneau + * Copyright (C) 2017 Jérémie Galarneau * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License, version 2.1 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: LGPL-2.1-only * - * This library 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 Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include +#include #include #include #include @@ -32,7 +23,7 @@ void lttng_evaluation_init(struct lttng_evaluation *evaluation, } LTTNG_HIDDEN -int lttng_evaluation_serialize(struct lttng_evaluation *evaluation, +int lttng_evaluation_serialize(const struct lttng_evaluation *evaluation, struct lttng_dynamic_buffer *buf) { int ret; @@ -116,6 +107,13 @@ ssize_t lttng_evaluation_create_from_buffer( } evaluation_size += ret; break; + case LTTNG_CONDITION_TYPE_EVENT_RULE_HIT: + ret = lttng_evaluation_event_rule_create_from_buffer(&evaluation_view, evaluation); + if (ret < 0) { + goto end; + } + evaluation_size += ret; + break; default: ERR("Attempted to create evaluation of unknown type (%i)", (int) evaluation_comm->type);