If the consume_func returns _AGAIN, we will append an error cause. That
is wrong because _AGAIN is not an error cause. Check for negative
status values instead of just != OK.
Change-Id: Ibc03a1e9eb25de5ec39af5148c8e235498c57b64
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2358
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
/* Call user's "consume" function */
status = data->init_method_data.consume_func(data->msg_iter,
data->init_method_data.user_data);
- if (status != BT_FUNC_STATUS_OK) {
+ if (status < 0) {
BT_LIB_LOGW_APPEND_CAUSE(
"Simple sink component's user's \"consume\" function failed: "
"status=%s, %![comp-]+c",