X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fevaluation.c;fp=src%2Fcommon%2Fevaluation.c;h=16c3ef39ca80b6a825f560619b29d3d0f7bdee71;hp=d8a68a7840429b44bf73679bd3b0abc1b30f6273;hb=7c920b632d63ffd82074430d77862176e0fc477c;hpb=82b3cbf431e12b5c5f65eaa474d0328fb86ece87 diff --git a/src/common/evaluation.c b/src/common/evaluation.c index d8a68a784..16c3ef39c 100644 --- a/src/common/evaluation.c +++ b/src/common/evaluation.c @@ -5,6 +5,7 @@ * */ +#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) { @@ -116,7 +118,13 @@ 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); + assert(condition); + assert(condition->type == LTTNG_CONDITION_TYPE_EVENT_RULE_HIT); + ret = lttng_evaluation_event_rule_create_from_payload( + container_of(condition, + const struct lttng_condition_event_rule, + parent), + &evaluation_view, evaluation); if (ret < 0) { goto end; }