#define BT_COMP_LOG_SELF_COMP self_comp
#define BT_LOG_OUTPUT_LEVEL log_level
#define BT_LOG_TAG "PLUGIN/FLT.LTTNG-UTILS.DEBUG-INFO"
-#include "plugins/comp-logging.h"
+#include "logging/comp-logging.h"
#include <glib.h>
bt_self_component *self_comp;
struct debug_info_component *comp;
const bt_trace *input_trace;
- uint64_t destruction_listener_id;
+ bt_listener_id destruction_listener_id;
/*
* Hash table of VPIDs (pointer to int64_t) to
bool event_has_payload_field(const bt_event *event,
const char *field_name)
{
- return event_borrow_payload_field(event, field_name) != NULL;
+ return event_borrow_payload_field(event, field_name);
}
static
bt_self_component_filter *self_comp_flt,
bt_self_component_port_output *self_port)
{
- bt_component_class_message_iterator_init_method_status status =
- BT_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_STATUS_OK;
+ bt_component_class_message_iterator_init_method_status status;
+ bt_self_component_port_input_message_iterator_create_from_message_iterator_status
+ msg_iter_status;
struct bt_self_component_port_input *input_port = NULL;
bt_self_component_port_input_message_iterator *upstream_iterator = NULL;
struct debug_info_msg_iter *debug_info_msg_iter = NULL;
debug_info_msg_iter->self_comp = self_comp;
/* Create an iterator on the upstream component. */
- upstream_iterator = bt_self_component_port_input_message_iterator_create(
- input_port);
- if (!upstream_iterator) {
- status = BT_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_STATUS_MEMORY_ERROR;
+ msg_iter_status = bt_self_component_port_input_message_iterator_create_from_message_iterator(
+ self_msg_iter, input_port, &upstream_iterator);
+ if (msg_iter_status != BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_OK) {
+ status = (int) msg_iter_status;
goto error;
}
bt_self_message_iterator_set_data(self_msg_iter, debug_info_msg_iter);
debug_info_msg_iter->input_iterator = self_msg_iter;
+ status = BT_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_STATUS_OK;
goto end;
error: