#include "common/assert.h"
#include "lib/assert-pre.h"
+#include "lib/assert-post.h"
#include <babeltrace2/graph/connection-const.h>
#include "lib/object.h"
#include "compat/compiler.h"
graph, upstream_port, downstream_port);
connection = g_new0(struct bt_connection, 1);
if (!connection) {
- BT_LOGE_STR("Failed to allocate one connection.");
+ BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate one connection.");
goto end;
}
parent_is_owner);
connection->iterators = g_ptr_array_new();
if (!connection->iterators) {
- BT_LOGE_STR("Failed to allocate a GPtrArray.");
+ BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GPtrArray.");
BT_OBJECT_PUT_REF_AND_RESET(connection);
goto end;
}
const struct bt_port_output *bt_connection_borrow_upstream_port_const(
const struct bt_connection *connection)
{
- BT_ASSERT_PRE_NON_NULL(connection, "Connection");
+ BT_ASSERT_PRE_DEV_NON_NULL(connection, "Connection");
return (void *) connection->upstream_port;
}
const struct bt_port_input *bt_connection_borrow_downstream_port_const(
const struct bt_connection *connection)
{
- BT_ASSERT_PRE_NON_NULL(connection, "Connection");
+ BT_ASSERT_PRE_DEV_NON_NULL(connection, "Connection");
return (void *) connection->downstream_port;
}