X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fevaluation.c;h=6b3e634947253812329f099770d2345f999622b1;hb=48a4000561343808724f7cb5fa8c131877489ccd;hp=872875a9f9a90f12aa5c821ef10b9477b6acc5ad;hpb=d602bd6a8ee25d5ca662dde4edb3db3cabf264e1;p=lttng-tools.git diff --git a/src/common/evaluation.c b/src/common/evaluation.c index 872875a9f..6b3e63494 100644 --- a/src/common/evaluation.c +++ b/src/common/evaluation.c @@ -10,20 +10,17 @@ #include #include #include -#include +#include #include #include #include -#include -LTTNG_HIDDEN void lttng_evaluation_init(struct lttng_evaluation *evaluation, enum lttng_condition_type type) { evaluation->type = type; } -LTTNG_HIDDEN int lttng_evaluation_serialize(const struct lttng_evaluation *evaluation, struct lttng_payload *payload) { @@ -48,7 +45,6 @@ end: return ret; } -LTTNG_HIDDEN ssize_t lttng_evaluation_create_from_payload( const struct lttng_condition *condition, struct lttng_payload_view *src_view, @@ -117,12 +113,13 @@ ssize_t lttng_evaluation_create_from_payload( } evaluation_size += ret; break; - case LTTNG_CONDITION_TYPE_ON_EVENT: - assert(condition); - assert(condition->type == LTTNG_CONDITION_TYPE_ON_EVENT); - ret = lttng_evaluation_on_event_create_from_payload( + case LTTNG_CONDITION_TYPE_EVENT_RULE_MATCHES: + LTTNG_ASSERT(condition); + LTTNG_ASSERT(condition->type == + LTTNG_CONDITION_TYPE_EVENT_RULE_MATCHES); + ret = lttng_evaluation_event_rule_matches_create_from_payload( container_of(condition, - const struct lttng_condition_on_event, + const struct lttng_condition_event_rule_matches, parent), &evaluation_view, evaluation); if (ret < 0) { @@ -154,6 +151,6 @@ void lttng_evaluation_destroy(struct lttng_evaluation *evaluation) return; } - assert(evaluation->destroy); + LTTNG_ASSERT(evaluation->destroy); evaluation->destroy(evaluation); }