Remove default port API
[babeltrace.git] / plugins / utils / dummy / dummy.c
index 3d7de4d50cf89960917a5d1c50f013cf046e5597..978ecdeacd6d871c7c8de0823821baa0ecf9a825 100644 (file)
@@ -23,6 +23,7 @@
 #include <babeltrace/plugin/plugin-dev.h>
 #include <babeltrace/graph/component.h>
 #include <babeltrace/graph/private-component.h>
+#include <babeltrace/graph/private-component-sink.h>
 #include <babeltrace/graph/private-port.h>
 #include <babeltrace/graph/port.h>
 #include <babeltrace/graph/private-connection.h>
@@ -58,12 +59,21 @@ enum bt_component_status dummy_init(struct bt_private_component *component,
 {
        enum bt_component_status ret;
        struct dummy *dummy = g_new0(struct dummy, 1);
+       void *priv_port;
 
        if (!dummy) {
                ret = BT_COMPONENT_STATUS_NOMEM;
                goto end;
        }
 
+       priv_port = bt_private_component_sink_add_input_private_port(component,
+               "in", NULL);
+       if (!priv_port) {
+               ret = BT_COMPONENT_STATUS_NOMEM;
+               goto end;
+       }
+
+       bt_put(priv_port);
        dummy->iterators = g_ptr_array_new_with_free_func(
                        (GDestroyNotify) bt_put);
        if (!dummy->iterators) {
This page took 0.023166 seconds and 4 git commands to generate.