X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fevaluation.c;h=e239193025f6e7abfe64273e92a1b199288e84ef;hp=f07c81b18cf9747250bc3284ff04cf713d4ebbb7;hb=9b63a4aa352c184984395c097f86d5e54c295012;hpb=3647288fe42b25340f905046f3bd9aef21e12aaa diff --git a/src/common/evaluation.c b/src/common/evaluation.c index f07c81b18..e23919302 100644 --- a/src/common/evaluation.c +++ b/src/common/evaluation.c @@ -18,13 +18,21 @@ #include #include #include +#include #include #include #include #include LTTNG_HIDDEN -int lttng_evaluation_serialize(struct lttng_evaluation *evaluation, +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_dynamic_buffer *buf) { int ret; @@ -92,6 +100,22 @@ ssize_t lttng_evaluation_create_from_buffer( } evaluation_size += ret; break; + case LTTNG_CONDITION_TYPE_SESSION_ROTATION_ONGOING: + ret = lttng_evaluation_session_rotation_ongoing_create_from_buffer( + &evaluation_view, evaluation); + if (ret < 0) { + goto end; + } + evaluation_size += ret; + break; + case LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED: + ret = lttng_evaluation_session_rotation_completed_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);