#include <babeltrace2/graph/connection-const.h>
#include "lib/object.h"
#include "compat/compiler.h"
+#include <stdbool.h>
#include <stdlib.h>
#include <glib.h>
/*
* Make sure that each message iterator which was created for
* this connection is finalized before we destroy it. Once a
- * message iterator is finalized, all its method return NULL or
- * the BT_MESSAGE_ITERATOR_STATUS_CANCELED status.
+ * message iterator is finalized, you cannot use it.
*
* Because connections are destroyed before components within a
* graph, this ensures that message iterators are always
* which is on graph destruction.
*/
for (i = 0; i < conn->iterators->len; i++) {
- struct bt_self_component_port_input_message_iterator *iterator =
+ struct bt_message_iterator *iterator =
g_ptr_array_index(conn->iterators, i);
BT_LIB_LOGD("Finalizing message iterator created by "
"this ended connection: %![iter-]+i", iterator);
- bt_self_component_port_input_message_iterator_try_finalize(
+ bt_message_iterator_try_finalize(
iterator);
/*
* from this connection's iterators on destruction
* because this connection won't exist anymore.
*/
- bt_self_component_port_input_message_iterator_set_connection(
+ bt_message_iterator_set_connection(
iterator, NULL);
}
BT_HIDDEN
void bt_connection_remove_iterator(struct bt_connection *conn,
- struct bt_self_component_port_input_message_iterator *iterator)
+ struct bt_message_iterator *iterator)
{
g_ptr_array_remove(conn->iterators, iterator);
BT_LIB_LOGD("Removed message iterator from connection: "