const bt_clock_class *clock_class = NULL;
const bt_clock_snapshot *clock_snapshot = NULL;
int ret = 0;
- bt_clock_snapshot_state cs_state = BT_CLOCK_SNAPSHOT_STATE_KNOWN;
bt_message_stream_activity_clock_snapshot_state sa_cs_state;
BT_ASSERT(msg);
msg);
BT_ASSERT(clock_class);
- cs_state = bt_message_event_borrow_default_clock_snapshot_const(
- msg, &clock_snapshot);
+ clock_snapshot = bt_message_event_borrow_default_clock_snapshot_const(
+ msg);
break;
case BT_MESSAGE_TYPE_PACKET_BEGINNING:
clock_class =
msg);
BT_ASSERT(clock_class);
- cs_state = bt_message_packet_beginning_borrow_default_clock_snapshot_const(
- msg, &clock_snapshot);
+ clock_snapshot = bt_message_packet_beginning_borrow_default_clock_snapshot_const(
+ msg);
break;
case BT_MESSAGE_TYPE_PACKET_END:
clock_class =
msg);
BT_ASSERT(clock_class);
- cs_state = bt_message_packet_end_borrow_default_clock_snapshot_const(
- msg, &clock_snapshot);
+ clock_snapshot = bt_message_packet_end_borrow_default_clock_snapshot_const(
+ msg);
break;
case BT_MESSAGE_TYPE_DISCARDED_EVENTS:
clock_class =
msg);
BT_ASSERT(clock_class);
- cs_state = bt_message_discarded_events_borrow_default_beginning_clock_snapshot_const(
- msg, &clock_snapshot);
+ clock_snapshot = bt_message_discarded_events_borrow_default_beginning_clock_snapshot_const(
+ msg);
break;
case BT_MESSAGE_TYPE_DISCARDED_PACKETS:
clock_class =
msg);
BT_ASSERT(clock_class);
- cs_state = bt_message_discarded_packets_borrow_default_beginning_clock_snapshot_const(
- msg, &clock_snapshot);
+ clock_snapshot = bt_message_discarded_packets_borrow_default_beginning_clock_snapshot_const(
+ msg);
break;
case BT_MESSAGE_TYPE_STREAM_ACTIVITY_BEGINNING:
clock_class =
break;
case BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY:
- cs_state =
+ clock_snapshot =
bt_message_message_iterator_inactivity_borrow_default_clock_snapshot_const(
- msg, &clock_snapshot);
+ msg);
break;
default:
/* All the other messages have a higher priority */
goto end;
}
- if (cs_state != BT_CLOCK_SNAPSHOT_STATE_KNOWN) {
- BT_LOGE_STR("Unsupported unknown clock snapshot.");
- ret = -1;
- goto end;
- }
-
clock_class = bt_clock_snapshot_borrow_clock_class_const(clock_snapshot);
BT_ASSERT(clock_class);