on-event evaluation: introduce on-event evaluation specific status code
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 17 Mar 2021 05:10:27 +0000 (01:10 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 18 Mar 2021 15:31:22 +0000 (11:31 -0400)
commit3ce811ee6c6c61a2c2c0909cf27e0dd8eea403fc
treeeaf64bcf79aeec7c0e05fba2a95990eb91d1b5ea
parentc738df170902f40de6d8e53c9f214a5308e4182b
on-event evaluation: introduce on-event evaluation specific status code

Before this change, `lttng_evaluation_on_event_get_captured_values`
returns `LTTNG_EVALUATION_STATUS_INVALID` when an evaluation's
condition has no capture descriptors. That status code is also used to
indicate a handful of "invalid parameter" conditions.

Not having captured values in an evaluation should not be considered an
error. Hence, a status enum that is specific to on-event evaluations is
added to introduce a "NONE" status that is not an error (positive value)
and wouldn't make sense for all evaluations (it could mean an error in
other circumstances).

`LTTNG_EVALUATION_ON_EVENT_STATUS_NONE` is returned when the condition
of an on-event evaluation has no capture descriptors.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ic2e3e90317a44c7bb3e95630956565690bffd760
include/lttng/condition/on-event.h
src/common/conditions/on-event.c
tests/regression/tools/notification/notification.c
This page took 0.032723 seconds and 4 git commands to generate.