X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fevaluation.c;h=15e4f11ee3d6f53b2e4389fc834d619c7c5453c1;hb=6e5e3c512dd7c4ead8ce89bff2de1a56a6d5e360;hp=b76d349fa40526225d9b7199a0d919955a1d8bfb;hpb=3e6e0df2f8f9f23d252c2508b6d741916dfcc4b3;p=lttng-tools.git diff --git a/src/common/evaluation.c b/src/common/evaluation.c index b76d349fa..15e4f11ee 100644 --- a/src/common/evaluation.c +++ b/src/common/evaluation.c @@ -5,10 +5,12 @@ * */ +#include #include #include #include #include +#include #include #include #include @@ -48,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) { @@ -114,6 +117,20 @@ ssize_t lttng_evaluation_create_from_payload( } evaluation_size += ret; break; + 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; + } + evaluation_size += ret; + break; default: ERR("Attempted to create evaluation of unknown type (%i)", (int) evaluation_comm->type);