message->default_cs = bt_clock_snapshot_create(
stream_class->default_clock_class);
if (!message->default_cs) {
- bt_object_put_no_null_check(message);
+ bt_object_put_ref_no_null_check(message);
message = NULL;
goto end;
}
BT_ASSERT(!message->packet);
message->packet = packet;
- bt_object_get_no_null_check_no_parent_check(
+ bt_object_get_ref_no_null_check_no_parent_check(
&message->packet->base);
bt_packet_set_is_frozen(packet, true);
BT_LIB_LOGD("Created packet message object: "
BT_LIB_LOGD("Recycling packet message: %!+n", msg);
bt_message_reset(msg);
- bt_object_put_no_null_check(&packet_msg->packet->base);
+ bt_object_put_ref_no_null_check(&packet_msg->packet->base);
if (packet_msg->default_cs) {
bt_clock_snapshot_recycle(packet_msg->default_cs);
{
struct bt_message_packet *packet_msg = (void *) message;
- BT_ASSERT_PRE_NON_NULL(message, "Message");
- BT_ASSERT_PRE_MSG_IS_TYPE(message,
+ BT_ASSERT_PRE_DEV_NON_NULL(message, "Message");
+ BT_ASSERT_PRE_DEV_MSG_IS_TYPE(message,
BT_MESSAGE_TYPE_PACKET_BEGINNING);
return packet_msg->packet;
}
{
struct bt_message_packet *packet_msg = (void *) message;
- BT_ASSERT_PRE_NON_NULL(message, "Message");
- BT_ASSERT_PRE_MSG_IS_TYPE(message,
+ BT_ASSERT_PRE_DEV_NON_NULL(message, "Message");
+ BT_ASSERT_PRE_DEV_MSG_IS_TYPE(message,
BT_MESSAGE_TYPE_PACKET_END);
return packet_msg->packet;
}
struct bt_message_packet *packet_msg = (void *) message;
BT_ASSERT(message);
- BT_ASSERT_PRE(packet_msg->packet->stream->class->default_clock_class,
+ BT_ASSERT_PRE_DEV(
+ packet_msg->packet->stream->class->default_clock_class,
"Message's stream's class has no default clock class: "
"%![msg-]+n, %![sc-]+S",
message, packet_msg->packet->stream->class);
bt_message_packet_beginning_borrow_default_clock_snapshot_const(
const struct bt_message *msg)
{
- BT_ASSERT_PRE_NON_NULL(msg, "Message");
- BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_PACKET_BEGINNING);
+ BT_ASSERT_PRE_DEV_NON_NULL(msg, "Message");
+ BT_ASSERT_PRE_DEV_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_PACKET_BEGINNING);
return borrow_packet_message_default_clock_snapshot_const(msg);
}
bt_message_packet_end_borrow_default_clock_snapshot_const(
const struct bt_message *msg)
{
- BT_ASSERT_PRE_NON_NULL(msg, "Message");
- BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_PACKET_END);
+ BT_ASSERT_PRE_DEV_NON_NULL(msg, "Message");
+ BT_ASSERT_PRE_DEV_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_PACKET_END);
return borrow_packet_message_default_clock_snapshot_const(msg);
}
bt_message_packet_beginning_borrow_stream_class_default_clock_class_const(
const struct bt_message *msg)
{
- BT_ASSERT_PRE_NON_NULL(msg, "Message");
- BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_PACKET_BEGINNING);
+ BT_ASSERT_PRE_DEV_NON_NULL(msg, "Message");
+ BT_ASSERT_PRE_DEV_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_PACKET_BEGINNING);
return borrow_packet_message_stream_class_default_clock_class(msg);
}
bt_message_packet_end_borrow_stream_class_default_clock_class_const(
const struct bt_message *msg)
{
- BT_ASSERT_PRE_NON_NULL(msg, "Message");
- BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_PACKET_END);
+ BT_ASSERT_PRE_DEV_NON_NULL(msg, "Message");
+ BT_ASSERT_PRE_DEV_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_PACKET_END);
return borrow_packet_message_stream_class_default_clock_class(msg);
}