Remove default port API
[babeltrace.git] / plugins / ctf / fs / fs.c
index 808f9ccfeb3bf1f437f3b29e88d5b8dd2befa5dc..2abd9b57cc02aa77e17a3653a9afeab08ed02dcb 100644 (file)
@@ -189,12 +189,6 @@ int create_one_port(struct ctf_fs_component *ctf_fs,
                port_name->str, stream_path);
 
        /* Create output port for this file */
-       port = bt_private_component_source_add_output_private_port(
-               ctf_fs->priv_comp, port_name->str);
-       if (!port) {
-               goto error;
-       }
-
        port_data = g_new0(struct ctf_fs_port_data, 1);
        if (!port_data) {
                goto error;
@@ -205,8 +199,9 @@ int create_one_port(struct ctf_fs_component *ctf_fs,
                goto error;
        }
 
-       ret = bt_private_port_set_user_data(port, port_data);
-       if (ret) {
+       port = bt_private_component_source_add_output_private_port(
+               ctf_fs->priv_comp, port_name->str, port_data);
+       if (!port) {
                goto error;
        }
 
@@ -234,17 +229,8 @@ int create_ports(struct ctf_fs_component *ctf_fs)
        const char *basename;
        GError *error = NULL;
        GDir *dir = NULL;
-       struct bt_private_port *def_port;
        struct ctf_fs_file *file = NULL;
 
-       /* Remove default port if needed */
-       def_port = bt_private_component_source_get_default_output_private_port(
-               ctf_fs->priv_comp);
-       if (def_port) {
-               bt_private_port_remove_from_component(def_port);
-               bt_put(def_port);
-       }
-
        /* Create one output port for each stream file */
        dir = g_dir_open(ctf_fs->trace_path->str, 0, &error);
        if (!dir) {
@@ -347,8 +333,8 @@ int create_cc_prio_map(struct ctf_fs_component *ctf_fs)
 
        for (i = 0; i < count; i++) {
                struct bt_ctf_clock_class *clock_class =
-                       bt_ctf_trace_get_clock_class(ctf_fs->metadata->trace,
-                               i);
+                       bt_ctf_trace_get_clock_class_by_index(
+                               ctf_fs->metadata->trace, i);
 
                assert(clock_class);
                ret = bt_clock_class_priority_map_add_clock_class(
This page took 0.038432 seconds and 4 git commands to generate.