Fix: use extern for variables instead of BT_HIDDEN
[babeltrace.git] / plugins / text / pretty / pretty.c
index 3d4708672049e2d833a8066a6b9182ce7da00771..4ac6ad6d5c20c5558483d3e5540019313e36c67b 100644 (file)
@@ -50,6 +50,8 @@
 
 #include "pretty.h"
 
+GQuark stream_packet_context_quarks[STREAM_PACKET_CONTEXT_QUARKS_LEN];
+
 static
 const char *plugin_options[] = {
        "color",
@@ -154,6 +156,10 @@ enum bt_component_status handle_notification(struct pretty_component *pretty,
        case BT_NOTIFICATION_TYPE_STREAM_BEGIN:
        case BT_NOTIFICATION_TYPE_STREAM_END:
                break;
+       case BT_NOTIFICATION_TYPE_DISCARDED_PACKETS:
+       case BT_NOTIFICATION_TYPE_DISCARDED_EVENTS:
+               ret = pretty_print_discarded_elements(pretty, notification);
+               break;
        default:
                fprintf(stderr, "Unhandled notification type\n");
        }
@@ -167,10 +173,13 @@ void pretty_port_connected(
                struct bt_private_port *self_port,
                struct bt_port *other_port)
 {
+       enum bt_connection_status conn_status;
        struct bt_private_connection *connection;
        struct pretty_component *pretty;
        static const enum bt_notification_type notif_types[] = {
                BT_NOTIFICATION_TYPE_EVENT,
+               BT_NOTIFICATION_TYPE_DISCARDED_PACKETS,
+               BT_NOTIFICATION_TYPE_DISCARDED_EVENTS,
                BT_NOTIFICATION_TYPE_SENTINEL,
        };
 
@@ -179,11 +188,9 @@ void pretty_port_connected(
        assert(!pretty->input_iterator);
        connection = bt_private_port_get_private_connection(self_port);
        assert(connection);
-       pretty->input_iterator =
-               bt_private_connection_create_notification_iterator(connection,
-                       notif_types);
-
-       if (!pretty->input_iterator) {
+       conn_status = bt_private_connection_create_notification_iterator(
+               connection, notif_types, &pretty->input_iterator);
+       if (conn_status != BT_CONNECTION_STATUS_OK) {
                pretty->error = true;
        }
 
This page took 0.025621 seconds and 4 git commands to generate.