Build system: build reader plug-in stub
[babeltrace.git] / plugins / ctf / ctf-reader / reader.c
index f839f9b0c5aa6d4eff98541b89b9daf52d918974..5802b8b050b91db5c8ba193f7a251da941a9f53d 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <babeltrace/plugin/plugin-lib.h>
 #include <babeltrace/plugin/plugin-system.h>
+#include <babeltrace/plugin/plugin.h>
 #include <glib.h>
 #include <stdio.h>
 
@@ -73,35 +74,20 @@ struct bt_notification_iterator *ctf_reader_iterator_create(
 
 struct bt_plugin *bt_plugin_lib_create(struct bt_object *params)
 {
-       enum bt_plugin_status ret;
        struct bt_plugin *plugin = NULL;
        struct ctf_reader *reader = g_new0(struct ctf_reader, 1);
 
-       if (!reader) {
-               goto error;
-       }
-
        plugin = bt_plugin_source_create(plugin_name, reader,
                ctf_reader_destroy, ctf_reader_iterator_create);
        if (!plugin) {
                goto error;
        }
-       reader = NULL;
 
-       ret = bt_plugin_set_error_stream_cb(plugin,
-               ctf_reader_set_error_stream);
-       if (ret != BT_PLUGIN_STATUS_OK) {
-               goto error;
-       }
 end:
        return plugin;
 error:
        if (reader) {
-               ctf_reader_destroy(reader);
-       }
-       if (plugin) {
-               bt_plugin_put(plugin);
-               plugin = NULL;
+               g_free(reader);
        }
        goto end;
 }
This page took 0.023609 seconds and 4 git commands to generate.