test_ctf_writer.c: put statements outside BT_ASSERT()
[babeltrace.git] / lib / plugin / plugin-so.c
index c656a35e6b828d6c5680d5d59d88cac26dbeef30..2326ed8f2adadf7c912d4bf2e65da13751eae01f 100644 (file)
@@ -39,6 +39,7 @@
 #include <babeltrace/graph/component-class-internal.h>
 #include <babeltrace/types.h>
 #include <babeltrace/list-internal.h>
+#include <babeltrace/assert-internal.h>
 #include <string.h>
 #include <stdlib.h>
 #include <glib.h>
@@ -105,7 +106,7 @@ void bt_plugin_so_shared_lib_handle_destroy(struct bt_object *obj)
 {
        struct bt_plugin_so_shared_lib_handle *shared_lib_handle;
 
-       assert(obj);
+       BT_ASSERT(obj);
        shared_lib_handle = container_of(obj,
                struct bt_plugin_so_shared_lib_handle, base);
        const char *path = shared_lib_handle->path ?
@@ -223,8 +224,8 @@ void bt_plugin_so_destroy_spec_data(struct bt_plugin *plugin)
                return;
        }
 
-       assert(plugin->type == BT_PLUGIN_TYPE_SO);
-       assert(spec);
+       BT_ASSERT(plugin->type == BT_PLUGIN_TYPE_SO);
+       BT_ASSERT(spec);
        BT_PUT(spec->shared_lib_handle);
        g_free(plugin->spec_data);
        plugin->spec_data = NULL;
@@ -282,7 +283,7 @@ enum bt_plugin_status bt_plugin_so_init(
                bt_component_class_accept_port_connection_method accept_port_connection_method;
                bt_component_class_port_connected_method port_connected_method;
                bt_component_class_port_disconnected_method port_disconnected_method;
-               struct bt_component_class_iterator_methods iterator_methods;
+               struct bt_component_class_notification_iterator_methods iterator_methods;
        };
 
        enum bt_plugin_status status = BT_PLUGIN_STATUS_OK;
@@ -466,10 +467,6 @@ enum bt_plugin_status bt_plugin_so_init(
                                        cc_full_descr->iterator_methods.finalize =
                                                cur_cc_descr_attr->value.notif_iter_finalize_method;
                                        break;
-                               case BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_SEEK_TIME_METHOD:
-                                       cc_full_descr->iterator_methods.seek_time =
-                                               cur_cc_descr_attr->value.notif_iter_seek_time_method;
-                                       break;
                                default:
                                        /*
                                         * WARN-level logging because
@@ -690,18 +687,6 @@ enum bt_plugin_status bt_plugin_so_init(
                                        goto end;
                                }
                        }
-
-                       if (cc_full_descr->iterator_methods.seek_time) {
-                               ret = bt_component_class_source_set_notification_iterator_seek_time_method(
-                                       comp_class,
-                                       cc_full_descr->iterator_methods.seek_time);
-                               if (ret) {
-                                       BT_LOGE_STR("Cannot set source component class's notification iterator seek to time method.");
-                                       status = BT_PLUGIN_STATUS_ERROR;
-                                       BT_PUT(comp_class);
-                                       goto end;
-                               }
-                       }
                        break;
                case BT_COMPONENT_CLASS_TYPE_FILTER:
                        if (cc_full_descr->iterator_methods.init) {
@@ -727,18 +712,6 @@ enum bt_plugin_status bt_plugin_so_init(
                                        goto end;
                                }
                        }
-
-                       if (cc_full_descr->iterator_methods.seek_time) {
-                               ret = bt_component_class_filter_set_notification_iterator_seek_time_method(
-                                       comp_class,
-                                       cc_full_descr->iterator_methods.seek_time);
-                               if (ret) {
-                                       BT_LOGE_STR("Cannot set filter component class's notification iterator seek to time method.");
-                                       status = BT_PLUGIN_STATUS_ERROR;
-                                       BT_PUT(comp_class);
-                                       goto end;
-                               }
-                       }
                        break;
                case BT_COMPONENT_CLASS_TYPE_SINK:
                        break;
@@ -1160,8 +1133,8 @@ void bt_plugin_so_on_add_component_class(struct bt_plugin *plugin,
 {
        struct bt_plugin_so_spec_data *spec = plugin->spec_data;
 
-       assert(plugin->spec_data);
-       assert(plugin->type == BT_PLUGIN_TYPE_SO);
+       BT_ASSERT(plugin->spec_data);
+       BT_ASSERT(plugin->type == BT_PLUGIN_TYPE_SO);
 
        bt_list_add(&comp_class->node, &component_class_list);
        comp_class->so_handle = bt_get(spec->shared_lib_handle);
This page took 0.0244180000000001 seconds and 4 git commands to generate.