X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fevaluation.c;h=15e4f11ee3d6f53b2e4389fc834d619c7c5453c1;hb=37ccf8ecee70257a97ab6939e5dcb0112826f409;hp=d8a68a7840429b44bf73679bd3b0abc1b30f6273;hpb=f14461318ba4a0c44bb7ed7a9c320c7d7b903052;p=lttng-tools.git diff --git a/src/common/evaluation.c b/src/common/evaluation.c index d8a68a784..15e4f11ee 100644 --- a/src/common/evaluation.c +++ b/src/common/evaluation.c @@ -5,11 +5,12 @@ * */ +#include #include #include #include #include -#include +#include #include #include #include @@ -49,6 +50,7 @@ end: LTTNG_HIDDEN ssize_t lttng_evaluation_create_from_payload( + const struct lttng_condition *condition, struct lttng_payload_view *src_view, struct lttng_evaluation **evaluation) { @@ -115,8 +117,15 @@ ssize_t lttng_evaluation_create_from_payload( } evaluation_size += ret; break; - case LTTNG_CONDITION_TYPE_EVENT_RULE_HIT: - ret = lttng_evaluation_event_rule_create_from_payload(&evaluation_view, evaluation); + case LTTNG_CONDITION_TYPE_EVENT_RULE_MATCHES: + assert(condition); + 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_event_rule_matches, + parent), + &evaluation_view, evaluation); if (ret < 0) { goto end; }