X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=plugins%2Ftext%2Fpretty%2Fpretty.c;h=0caf05bde6e5eb0ec7e095afbc79480c58b96902;hb=bf55043c2e742cafb86d3a3404d0d35c4cf294a3;hp=1010917d09faada2fa8ef6510b53f3fc8f1bed4b;hpb=d4393e0875e7b08f6ee97d617cc5f2c9286742a4;p=babeltrace.git diff --git a/plugins/text/pretty/pretty.c b/plugins/text/pretty/pretty.c index 1010917d..0caf05bd 100644 --- a/plugins/text/pretty/pretty.c +++ b/plugins/text/pretty/pretty.c @@ -152,11 +152,12 @@ enum bt_component_status handle_notification(struct pretty_component *pretty, } BT_HIDDEN -void pretty_port_connected( +enum bt_component_status pretty_port_connected( struct bt_private_component *component, struct bt_private_port *self_port, struct bt_port *other_port) { + enum bt_component_status status = BT_COMPONENT_STATUS_OK; enum bt_connection_status conn_status; struct bt_private_connection *connection; struct pretty_component *pretty; @@ -169,10 +170,11 @@ void pretty_port_connected( conn_status = bt_private_connection_create_notification_iterator( connection, &pretty->input_iterator); if (conn_status != BT_CONNECTION_STATUS_OK) { - pretty->error = true; + status = BT_COMPONENT_STATUS_ERROR; } bt_put(connection); + return status; } BT_HIDDEN @@ -187,11 +189,6 @@ enum bt_component_status pretty_consume(struct bt_private_component *component) uint64_t count = 0; uint64_t i = 0; - if (unlikely(pretty->error)) { - ret = BT_COMPONENT_STATUS_ERROR; - goto end; - } - it = pretty->input_iterator; it_ret = bt_private_connection_notification_iterator_next(it, ¬ifs, &count);