if (message->default_cs) {
bt_clock_snapshot_recycle(message->default_cs);
+ message->default_cs = NULL;
}
g_free(message);
struct bt_message *bt_message_inactivity_create(
struct bt_self_message_iterator *self_msg_iter,
- struct bt_clock_class *default_clock_class)
+ const struct bt_clock_class *default_clock_class)
{
struct bt_self_component_port_input_message_iterator *msg_iter =
(void *) self_msg_iter;
BT_MESSAGE_TYPE_INACTIVITY,
bt_message_inactivity_destroy, NULL);
ret_msg = &message->parent;
- message->default_cs = bt_clock_snapshot_create(default_clock_class);
+ message->default_cs = bt_clock_snapshot_create(
+ (void *) default_clock_class);
if (!message->default_cs) {
goto error;
}
BT_ASSERT_PRE_NON_NULL(msg, "Message");
BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_INACTIVITY);
BT_ASSERT_PRE_HOT(msg, "Message", ": %!+n", msg);
- bt_clock_snapshot_set_value_inline(inactivity->default_cs, value_cycles);
+ bt_clock_snapshot_set_raw_value(inactivity->default_cs, value_cycles);
BT_LIB_LOGV("Set inactivity message's default clock snapshot: "
"%![msg-]+n, value=%" PRIu64, msg, value_cycles);
}