X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=plugins%2Ftext%2Fpretty%2Fpretty.c;h=1b5729ab30c71081654ea90f7ce225e7fd44717c;hb=734a0572d453b07093c3077407c22c383ceffc3b;hp=d83b30c160123b85b3693a4bfab665e90118eaff;hpb=3a109f4c183287da0095e70e5ebbe67816abc36e;p=deliverable%2Fbabeltrace.git diff --git a/plugins/text/pretty/pretty.c b/plugins/text/pretty/pretty.c index d83b30c16..1b5729ab3 100644 --- a/plugins/text/pretty/pretty.c +++ b/plugins/text/pretty/pretty.c @@ -62,6 +62,9 @@ const char *plugin_options[] = { "field-callsite", }; +static +const char * const in_port_name = "in"; + static void destroy_pretty_data(struct pretty_component *pretty) { @@ -152,10 +155,8 @@ bt_self_component_status handle_message( } BT_HIDDEN -bt_self_component_status pretty_port_connected( - bt_self_component_sink *comp, - bt_self_component_port_input *self_port, - const bt_port_output *other_port) +bt_self_component_status pretty_graph_is_configured( + bt_self_component_sink *comp) { bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; struct pretty_component *pretty; @@ -165,7 +166,8 @@ bt_self_component_status pretty_port_connected( BT_ASSERT(pretty); BT_ASSERT(!pretty->iterator); pretty->iterator = bt_self_component_port_input_message_iterator_create( - self_port); + bt_self_component_sink_borrow_input_port_by_name(comp, + in_port_name)); if (!pretty->iterator) { status = BT_SELF_COMPONENT_STATUS_NOMEM; } @@ -650,7 +652,8 @@ bt_self_component_status pretty_init( goto end; } - ret = bt_self_component_sink_add_input_port(comp, "in", NULL, NULL); + ret = bt_self_component_sink_add_input_port(comp, in_port_name, + NULL, NULL); if (ret != BT_SELF_COMPONENT_STATUS_OK) { goto end; }