X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=plugins%2Ftext%2Fpretty%2Fpretty.c;h=d7346de1ed92bd202dbd37a34c9ffa8ee39d3e0c;hp=ece1f1e6e46db945709a8ce14651c01e1f2ed8d6;hb=7cdc2bab17acd56d035b204518ef845fa5a9f1c7;hpb=f05de085a4b86c9efef9a5b222333dc648f1e090 diff --git a/plugins/text/pretty/pretty.c b/plugins/text/pretty/pretty.c index ece1f1e6..d7346de1 100644 --- a/plugins/text/pretty/pretty.c +++ b/plugins/text/pretty/pretty.c @@ -130,8 +130,20 @@ enum bt_component_status handle_notification(struct pretty_component *pretty, assert(pretty); - if (bt_notification_get_type(notification) == BT_NOTIFICATION_TYPE_EVENT) { + switch (bt_notification_get_type(notification)) { + case BT_NOTIFICATION_TYPE_EVENT: ret = pretty_print_event(pretty, notification); + break; + case BT_NOTIFICATION_TYPE_INACTIVITY: + fprintf(stderr, "Inactivity notification\n"); + break; + case BT_NOTIFICATION_TYPE_PACKET_BEGIN: + case BT_NOTIFICATION_TYPE_PACKET_END: + case BT_NOTIFICATION_TYPE_STREAM_BEGIN: + case BT_NOTIFICATION_TYPE_STREAM_END: + break; + default: + fprintf(stderr, "Unhandled notification type\n"); } return ret; @@ -185,9 +197,6 @@ enum bt_component_status pretty_consume(struct bt_private_component *component) it_ret = bt_notification_iterator_next(it); switch (it_ret) { - case BT_NOTIFICATION_ITERATOR_STATUS_ERROR: - ret = BT_COMPONENT_STATUS_ERROR; - goto end; case BT_NOTIFICATION_ITERATOR_STATUS_END: ret = BT_COMPONENT_STATUS_END; BT_PUT(pretty->input_iterator);