-#if 0
- const struct bt_packet *packet = bt_notification_packet_begin_borrow_packet_const(
- packet_beginning_notif);
- uint64_t count;
- int status = 0;
-
- if (bt_packet_get_discarded_event_count(packet, &count) ==
- BT_PACKET_PROPERTY_AVAILABILITY_AVAILABLE &&
- count > 0) {
- status = print_discarded_elements_msg(pretty, packet,
- count, "event");
- if (status != 0) {
- goto end;
+ const bt_clock_snapshot *begin = NULL;
+ const bt_clock_snapshot *end = NULL;
+ const bt_stream *stream;
+ const bt_stream_class *stream_class;
+ uint64_t count = UINT64_C(-1);
+ const char *elem_type;
+
+ switch (bt_message_get_type(msg)) {
+ case BT_MESSAGE_TYPE_DISCARDED_EVENTS:
+ stream = bt_message_discarded_events_borrow_stream_const(msg);
+
+ if (bt_message_discarded_events_get_count(msg, &count) ==
+ BT_PROPERTY_AVAILABILITY_NOT_AVAILABLE) {
+ count = UINT64_C(-1);
+ }
+
+ elem_type = "event";
+ break;
+ case BT_MESSAGE_TYPE_DISCARDED_PACKETS:
+ stream = bt_message_discarded_packets_borrow_stream_const(msg);
+
+ if (bt_message_discarded_packets_get_count(msg, &count) ==
+ BT_PROPERTY_AVAILABILITY_NOT_AVAILABLE) {
+ count = UINT64_C(-1);