Adapt plugin system to use unified reference counting
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 15 Aug 2015 15:18:18 +0000 (11:18 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 16:57:26 +0000 (12:57 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
14 files changed:
include/babeltrace/plugin/component-class-internal.h
include/babeltrace/plugin/component-factory-internal.h
include/babeltrace/plugin/component-factory.h
include/babeltrace/plugin/component-internal.h
include/babeltrace/plugin/notification/iterator-internal.h
include/babeltrace/plugin/notification/iterator.h
include/babeltrace/plugin/notification/notification-internal.h
include/babeltrace/plugin/plugin-internal.h
plugins/component-class.c
plugins/component-factory.c
plugins/component.c
plugins/iterator.c
plugins/plugin.c
plugins/source.c

index e516478b779f894a0ae4e07db1755bdb1a09779f..500d7cf3f503f34c51bf2edcbf354d57d1fd920d 100644 (file)
  */
 
 #include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/ref-internal.h>
 #include <babeltrace/plugin/component-factory-internal.h>
 #include <babeltrace/plugin/plugin-internal.h>
+#include <babeltrace/object-internal.h>
 
 struct bt_component_class {
-       struct bt_ref ref;
+       struct bt_object base;
        enum bt_component_type type;
        GString *name;
        struct bt_plugin *plugin;
@@ -44,10 +44,4 @@ struct bt_component_class *bt_component_class_create(
                enum bt_component_type type, const char *name,
                struct bt_plugin *plugin);
 
-BT_HIDDEN
-void bt_component_class_get(struct bt_component_class *class);
-
-BT_HIDDEN
-void bt_component_class_put(struct bt_component_class *class);
-
 #endif /* BABELTRACE_PLUGIN_COMPONENT_CLASS_INTERNAL_H */
index 257ff0f5716781550cacaebb9b887d7f6d060331..3ee24f8510d80f1f81b164b59d524ba1e61e6f9f 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 #include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/ref-internal.h>
+#include <babeltrace/object-internal.h>
 #include <babeltrace/plugin/component-factory.h>
 #include <babeltrace/plugin/component.h>
 #include <babeltrace/plugin/component-class-internal.h>
@@ -37,7 +37,8 @@
 #include <glib.h>
 
 struct bt_component_factory {
-       /** Array of pointers to struct plugin */
+       struct bt_object base;
+       /** Array of pointers to struct bt_plugin */
        GPtrArray *plugins;
        /** Array of pointers to struct bt_component_class */
        GPtrArray *components;
index 5915a5b1b36c8f39cdac5c04e634d223dc882cdf..4513035ce727d44558e4481d7cdc8942a6272176 100644 (file)
@@ -71,14 +71,12 @@ struct bt_component_factory;
  *
  * @returns    An instance of component factory
  */
-extern
-struct bt_component_factory *bt_component_factory_create(void);
+extern struct bt_component_factory *bt_component_factory_create(void);
 
 /**
  * Get the list of components registered to this factory.
  */
-extern
-struct bt_object *bt_component_factory_get_components(
+extern struct bt_object *bt_component_factory_get_components(
                struct bt_component_factory *factory);
 
 /**
@@ -91,24 +89,19 @@ struct bt_object *bt_component_factory_get_components(
  * @param path         A path to a file or directory
  * @returns            One of #bt_component_factory_status values
  */
-extern
-enum bt_component_factory_status bt_component_factory_load(
+extern enum bt_component_factory_status bt_component_factory_load(
                struct bt_component_factory *factory, const char *path);
 
-extern
-enum bt_component_factory_status
+extern enum bt_component_factory_status
 bt_component_factory_register_source_component_class(
                struct bt_component_factory *factory, const char *name,
                bt_component_source_init_cb init);
 
-extern
-enum bt_component_factory_status bt_component_factory_register_sink_component_class(
+extern enum bt_component_factory_status
+bt_component_factory_register_sink_component_class(
                struct bt_component_factory *factory, const char *name,
                bt_component_sink_init_cb init);
 
-extern
-void bt_component_factory_destroy(struct bt_component_factory *factory);
-
 #ifdef __cplusplus
 }
 #endif
index 7a9361feb2545f63ec38f2e83b7249fa8372ed86..c6443e54e96e9f7ed1bb5374fee30135c8e8714d 100644 (file)
 #include <babeltrace/plugin/plugin-system.h>
 #include <babeltrace/plugin/component.h>
 #include <babeltrace/plugin/component-class-internal.h>
-#include <babeltrace/ref-internal.h>
+#include <babeltrace/object-internal.h>
 #include <glib.h>
 #include <stdio.h>
 
 struct bt_component {
-       struct bt_ref ref;
+       struct bt_object base;
        struct bt_component_class *class;
        GString *name;
-       /** No ownership taken */
+       /** No ownership of stream taken */
        FILE *error_stream;
-       /** source, sink or filter destroy */
+       /** Source, Sink or Filter destroy */
        bt_component_destroy_cb destroy;
 
+       /** User-defined data and its destruction callback */
        void *user_data;
        bt_component_destroy_cb user_destroy;
 };
index e2ef852ed4c4e0eb2e83de4ab5a277fb3f78fcbe..dd6ba4507efda52c3eb814cbd122459e62381439 100644 (file)
@@ -32,7 +32,7 @@
 #include <babeltrace/ref-internal.h>
 
 struct bt_notification_iterator {
-       struct bt_ref ref;
+       struct bt_object base;
        bt_notification_iterator_get_cb get;
        bt_notification_iterator_next_cb next;
        void *user_data;
index 480f50c7800d22fff4ac89e552fe473d38766985..c958c5827b3989f5db8e23385480592b3bb8aca5 100644 (file)
@@ -119,27 +119,6 @@ extern enum bt_notification_iterator_status *bt_notification_iterator_seek(
                struct bt_notification_iterator *iterator, int whence,
                int64_t time);
 
-/**
- * Increments the reference count of \p iterator.
- *
- * @param iterator     Iterator of which to increment the reference count
- *
- * @see bt_notification_iterator_put()
- */
-extern void bt_notification_iterator_get(
-               struct bt_notification_iterator *iterator);
-
-/**
- * Decrements the reference count of \p iterator, destroying it when this
- * count reaches 0.
- *
- * @param iterator     Iterator of which to decrement the reference count
- *
- * @see bt_notification_iterator_get()
- */
-extern void bt_notification_iterator_put(
-               struct bt_notification_iterator *iterator);
-
 #ifdef __cplusplus
 }
 #endif
index 0d909db45c6041512db0b0bca2b41a9ba80e73cf..a59d503500a94352573fc9c61d24ab0b0edc7e8d 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <babeltrace/ctf-writer/ref-internal.h>
 #include <babeltrace/babeltrace-internal.h>
+#include <babeltrace/object-internal.h>
 #include <babeltrace/plugin/notification/notification.h>
 
 #ifdef __cplusplus
@@ -36,7 +37,7 @@ extern "C" {
 #endif
 
 struct bt_notification {
-       struct bt_ctf_ref ref;
+       struct bt_object base;
        enum bt_notification_type type;
 };
 
index 96aa692a72da7dfea0ddab8f586f3974c5e468fb..3b60ea2f83e275edd1846a180db8c0134ecb093e 100644 (file)
@@ -31,6 +31,7 @@
 #include <babeltrace/ref-internal.h>
 #include <babeltrace/plugin/component.h>
 #include <babeltrace/plugin/plugin.h>
+#include <babeltrace/object-internal.h>
 #include <gmodule.h>
 
 /**
  * reference to their plugin.
  *
  * This ensures that a plugin's library is not closed while it is being used
- * even if the bt_component_factory which created its components is destroyed.
+ * even if the bt_component_factory, which created its components, is destroyed.
  */
 struct bt_plugin {
-       struct bt_ref ref;
+       struct bt_object base;
        const char *name;
        const char *author;
        const char *license;
@@ -60,10 +61,4 @@ BT_HIDDEN
 enum bt_component_status bt_plugin_register_component_classes(
                struct bt_plugin *plugin, struct bt_component_factory *factory);
 
-BT_HIDDEN
-void bt_plugin_get(struct bt_plugin *plugin);
-
-BT_HIDDEN
-void bt_plugin_put(struct bt_plugin *plugin);
-
 #endif /* BABELTRACE_PLUGIN_COMPONENT_CLASS_INTERNAL_H */
index 191efdcb1ef8869e809b97d3e77462b5f7a9d7b1..c13358f872a33e773e919bd28d3a3704e37b0bec 100644 (file)
 
 #include <babeltrace/compiler.h>
 #include <babeltrace/plugin/component-class-internal.h>
+#include <babeltrace/ref.h>
 #include <glib.h>
 
 static
-void bt_component_class_destroy(struct bt_ref *ref)
+void bt_component_class_destroy(struct bt_object *obj)
 {
        struct bt_component_class *class;
 
-       assert(ref);
-       class = container_of(ref, struct bt_component_class, ref);
+       assert(obj);
+       class = container_of(obj, struct bt_component_class, base);
        if (class->name) {
                g_string_free(class->name, TRUE);
        }
-       bt_plugin_put(class->plugin);
+
+       bt_put(class->plugin);
        g_free(class);
 }
 
@@ -56,36 +58,16 @@ struct bt_component_class *bt_component_class_create(
                goto end;
        }
 
-       bt_ref_init(&class->ref, bt_component_class_destroy);
+       bt_object_init(class, bt_component_class_destroy);
        class->type = type;
        class->name = g_string_new(name);
        if (!class->name) {
-               bt_component_class_put(class);
-               class = NULL;
+               BT_PUT(class);
                goto end;
        }
-       bt_plugin_get(plugin);
+
+       bt_get(plugin);
        class->plugin = plugin;
 end:
        return class;
 }
-
-BT_HIDDEN
-void bt_component_class_get(struct bt_component_class *class)
-{
-       if (!class) {
-               return;
-       }
-
-       bt_ref_get(&class->ref);
-}
-
-BT_HIDDEN
-void bt_component_class_put(struct bt_component_class *class)
-{
-       if (!class) {
-               return;
-       }
-
-       bt_ref_put(&class->ref);
-}
index a91b63a01a6099d76e729138547b78950fb5f03c..03e0148595065ee1a14e4e2ce17673e9ed275ed9 100644 (file)
@@ -30,6 +30,7 @@
 #include <babeltrace/plugin/component-factory-internal.h>
 #include <babeltrace/babeltrace-internal.h>
 #include <babeltrace/compiler.h>
+#include <babeltrace/ref.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <sys/stat.h>
@@ -87,11 +88,11 @@ bt_component_factory_load_file(struct bt_component_factory *factory,
         * or .la on Linux).
         */
        if (strncmp(NATIVE_PLUGIN_SUFFIX,
-               path + path_len - NATIVE_PLUGIN_SUFFIX_LEN,
-               NATIVE_PLUGIN_SUFFIX_LEN) &&
-               strncmp(LIBTOOL_PLUGIN_SUFFIX,
-               path + path_len - LIBTOOL_PLUGIN_SUFFIX_LEN,
-               LIBTOOL_PLUGIN_SUFFIX_LEN)) {
+                       path + path_len - NATIVE_PLUGIN_SUFFIX_LEN,
+                       NATIVE_PLUGIN_SUFFIX_LEN) &&
+                       strncmp(LIBTOOL_PLUGIN_SUFFIX,
+                       path + path_len - LIBTOOL_PLUGIN_SUFFIX_LEN,
+                       LIBTOOL_PLUGIN_SUFFIX_LEN)) {
                /* Name indicates that this is not a plugin file. */
                ret = BT_COMPONENT_FACTORY_STATUS_INVAL;
                goto end;
@@ -116,7 +117,7 @@ bt_component_factory_load_file(struct bt_component_factory *factory,
        }
 
        component_status = bt_plugin_register_component_classes(plugin,
-               factory);
+                       factory);
        if (component_status != BT_COMPONENT_STATUS_OK) {
                switch (component_status) {
                case BT_COMPONENT_STATUS_NOMEM:
@@ -126,8 +127,8 @@ bt_component_factory_load_file(struct bt_component_factory *factory,
                        ret = BT_COMPONENT_FACTORY_STATUS_ERROR;
                        break;
                }
-               bt_plugin_put(plugin);
-               plugin = NULL;
+
+               BT_PUT(plugin);
                goto end;
        }
        g_ptr_array_add(factory->plugins, plugin);
@@ -191,7 +192,7 @@ bt_component_factory_load_dir_recursive(struct bt_component_factory *factory,
 
                if (S_ISDIR(st.st_mode)) {
                        ret = bt_component_factory_load_dir_recursive(factory,
-                               file_path);
+                                       file_path);
                        if (ret != BT_COMPONENT_FACTORY_STATUS_OK) {
                                goto end;
                        }
@@ -205,11 +206,13 @@ end:
        return ret;
 }
 
-void bt_component_factory_destroy(struct bt_component_factory *factory)
+static
+void bt_component_factory_destroy(struct bt_object *obj)
 {
-       if (!factory) {
-               return;
-       }
+       struct bt_component_factory *factory = NULL;
+
+       assert(obj);
+       factory = container_of(obj, struct bt_component_factory, base);
 
        if (factory->plugins) {
                g_ptr_array_free(factory->plugins, TRUE);
@@ -220,8 +223,7 @@ void bt_component_factory_destroy(struct bt_component_factory *factory)
        g_free(factory);
 }
 
-struct bt_component_factory *
-bt_component_factory_create(void)
+struct bt_component_factory *bt_component_factory_create(void)
 {
        struct bt_component_factory *factory;
 
@@ -230,57 +232,48 @@ bt_component_factory_create(void)
                goto end;
        }
 
+       bt_object_init(factory, bt_component_factory_destroy);
        factory->plugins = g_ptr_array_new_with_free_func(
-               (GDestroyNotify) bt_plugin_put);
+               (GDestroyNotify) bt_put);
        if (!factory->plugins) {
                goto error;
        }
        factory->components = g_ptr_array_new_with_free_func(
-               (GDestroyNotify) bt_component_put);
+               (GDestroyNotify) bt_put);
        if (!factory->components) {
                goto error;
        }
 end:
        return factory;
 error:
-       bt_component_factory_destroy(factory);
-       return NULL;
+        BT_PUT(factory);
+       return factory;
 }
 
 enum bt_component_factory_status bt_component_factory_load(
                struct bt_component_factory *factory, const char *path)
 {
        enum bt_component_factory_status ret = BT_COMPONENT_FACTORY_STATUS_OK;
-       DIR *directory = NULL;
 
        if (!factory || !path) {
                ret = BT_COMPONENT_FACTORY_STATUS_INVAL;
                goto end;
        }
 
-       directory = opendir(path) ;
-       if (!directory) {
-               switch (errno) {
-               case ENOTDIR:
-                       /* Try loading as a file. */
-                       break;
-               case ENOENT:
-                       ret = BT_COMPONENT_FACTORY_STATUS_NOENT;
-                       goto end;
-               default:
-                       ret = BT_COMPONENT_FACTORY_STATUS_IO;
-                       goto end;
-               }
+       if (!g_file_test(path, G_FILE_TEST_EXISTS)) {
+               ret = BT_COMPONENT_FACTORY_STATUS_NOENT;
+               goto end;
        }
 
-       if (directory) {
+       if (g_file_test(path, G_FILE_TEST_IS_DIR)) {
                ret = bt_component_factory_load_dir_recursive(factory, path);
-       } else {
+       } else if (g_file_test(path, G_FILE_TEST_IS_REGULAR) ||
+                       g_file_test(path, G_FILE_TEST_IS_SYMLINK)) {
                ret = bt_component_factory_load_file(factory, path);
+       } else {
+               ret = BT_COMPONENT_FACTORY_STATUS_INVAL;
+               goto end;
        }
 end:
-       if (directory) {
-               closedir(directory);
-       }
        return ret;
 }
index 86e86ade9ad8f69934f2a540850e90d44313d96b..c931ddf62053d42c400e5966d459aca109211795 100644 (file)
 #include <babeltrace/plugin/component-internal.h>
 #include <babeltrace/babeltrace-internal.h>
 #include <babeltrace/compiler.h>
+#include <babeltrace/ref.h>
 
-static void bt_component_destroy(struct bt_ref *ref);
+static
+void bt_component_destroy(struct bt_object *obj)
+{
+       struct bt_component *component = NULL;
+       struct bt_component_class *component_class = NULL;
+
+       if (!obj) {
+               return;
+       }
+
+       component = container_of(obj, struct bt_component, base);
+
+       /**
+        * User data is destroyed first, followed by the concrete component
+        * instance.
+        */
+       assert(!component->user_data || component->user_destroy);
+       component->user_destroy(component->user_data);
+
+       g_string_free(component->name, TRUE);
+
+       assert(component->destroy);
+       component_class = component->class;
+
+       /* Frees the component, which becomes invalid */
+       component->destroy(component);
+       component = NULL;
+
+       bt_put(component_class);
+}
+
+BT_HIDDEN
+enum bt_component_status bt_component_init(struct bt_component *component,
+               struct bt_component_class *class, const char *name,
+               bt_component_destroy_cb destroy)
+{
+       enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
+
+       if (!component || !class || !name || name[0] == '\0' || !destroy) {
+               ret = BT_COMPONENT_STATUS_INVAL;
+               goto end;
+       }
+
+       bt_object_init(component, bt_component_destroy);
+       bt_get(class);
+       component->class = class;
+       component->name = g_string_new(name);
+       if (!component->name) {
+               ret = BT_COMPONENT_STATUS_NOMEM;
+               goto end;
+       }
+       component->destroy = destroy;
+end:
+       return ret;
+}
 
 const char *bt_component_get_name(struct bt_component *component)
 {
@@ -89,49 +144,6 @@ end:
        return ret;
 }
 
-void bt_component_get(struct bt_component *component)
-{
-       if (!component) {
-               return;
-       }
-
-       bt_ref_get(&component->ref);
-}
-
-void bt_component_put(struct bt_component *component)
-{
-       if (!component) {
-               return;
-       }
-
-       bt_ref_put(&component->ref);
-}
-
-BT_HIDDEN
-enum bt_component_status bt_component_init(struct bt_component *component,
-               struct bt_component_class *class, const char *name,
-               bt_component_destroy_cb destroy)
-{
-       enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
-
-       if (!component || !class || !name || name[0] == '\0' || destroy) {
-               ret = BT_COMPONENT_STATUS_INVAL;
-               goto end;
-       }
-
-       bt_ref_init(&component->ref, bt_component_destroy);
-       bt_component_class_get(class);
-       component->class = class;
-       component->name = g_string_new(name);
-       if (!component->name) {
-               ret = BT_COMPONENT_STATUS_NOMEM;
-               goto end;
-       }
-       component->destroy = destroy;
-end:
-       return ret;
-}
-
 void *bt_component_get_private_data(struct bt_component *component)
 {
        void *ret = NULL;
@@ -160,28 +172,3 @@ bt_component_set_private_data(struct bt_component *component,
 end:
        return ret;
 }
-
-static
-void bt_component_destroy(struct bt_ref *ref)
-{
-       struct bt_component *component = NULL;
-
-       if (!ref) {
-               return;
-       }
-
-       component = container_of(ref, struct bt_component, ref);
-
-       /**
-        * User data is destroyed first, followed by the concrete component
-        * instance.
-        */
-       assert(!component->user_data || component->user_destroy);
-       component->user_destroy(component->user_data);
-
-       g_string_free(component->name, TRUE);
-
-       assert(component->destroy);
-       component->destroy(component);
-       bt_component_class_put(component->class);
-}
index cfa143a30ef79bfd43d12adebb2f6a5fabe6fa32..4cfd1e49e3fc4871c7bdbf20ff174f6a1ecb2fca 100644 (file)
  */
 
 #include <babeltrace/compiler.h>
+#include <babeltrace/ref.h>
 #include <babeltrace/plugin/component.h>
 #include <babeltrace/plugin/source-internal.h>
 #include <babeltrace/plugin/notification/iterator.h>
 #include <babeltrace/plugin/notification/iterator-internal.h>
 
 static
-void bt_notification_iterator_destroy(struct bt_ref *ref)
+void bt_notification_iterator_destroy(struct bt_object *obj)
 {
        struct bt_notification_iterator *iterator;
 
-       if (!ref) {
-               return;
-       }
-
-       iterator = container_of(ref, struct bt_notification_iterator,
-               ref);
+       assert(obj);
+       iterator = container_of(obj, struct bt_notification_iterator,
+                       base);
        assert(iterator->user_destroy || !iterator->user_data);
        iterator->user_destroy(iterator);
        g_free(iterator);
@@ -64,7 +62,7 @@ struct bt_notification_iterator *bt_notification_iterator_create(
                goto end;
        }
 
-       bt_ref_init(&iterator->ref, bt_notification_iterator_destroy);
+       bt_object_init(iterator, bt_notification_iterator_destroy);
 end:
        return iterator;
 }
@@ -84,24 +82,6 @@ end:
        return ret;
 }
 
-void bt_notification_iterator_get(struct bt_notification_iterator *iterator)
-{
-       if (!iterator) {
-               return;
-       }
-
-       bt_ref_get(&iterator->ref);
-}
-
-void bt_notification_iterator_put(struct bt_notification_iterator *iterator)
-{
-       if (!iterator) {
-               return;
-       }
-
-       bt_ref_put(&iterator->ref);
-}
-
 enum bt_notification_iterator_status bt_notification_iterator_set_get_cb(
                struct bt_notification_iterator *iterator,
                bt_notification_iterator_get_cb get)
index 3505677760659fc751a9c2b3855cbaddfe558d75..1a2eb11555d1585a62b3348f636d08f7dab0da4f 100644 (file)
@@ -27,6 +27,7 @@
  */
 
 #include <babeltrace/compiler.h>
+#include <babeltrace/ref.h>
 #include <babeltrace/plugin/plugin-internal.h>
 #include <glib.h>
 
 #define PLUGIN_SYMBOL_EXIT     "__bt_plugin_exit"
 
 static
-void bt_plugin_destroy(struct bt_ref *ref)
+void bt_plugin_destroy(struct bt_object *obj)
 {
        struct bt_plugin *plugin;
 
-       assert(ref);
-       plugin = container_of(ref, struct bt_plugin, ref);
+       assert(obj);
+       plugin = container_of(obj, struct bt_plugin, base);
+
        if (plugin->module) {
                if (!g_module_close(plugin->module)) {
                        printf_error("Module close error: %s",
@@ -67,7 +69,7 @@ struct bt_plugin *bt_plugin_create(GModule *module)
                goto error;
        }
 
-       bt_ref_init(&plugin->ref, bt_plugin_destroy);
+       bt_object_init(plugin, bt_plugin_destroy);
        if (!g_module_symbol(module, PLUGIN_SYMBOL_NAME,
                (gpointer *) &plugin->name))
        {
@@ -97,8 +99,8 @@ struct bt_plugin *bt_plugin_create(GModule *module)
 
        return plugin;
 error:
-       bt_plugin_put(plugin);
-       return NULL;
+        BT_PUT(plugin);
+       return plugin;
 }
 
 BT_HIDDEN
@@ -108,23 +110,3 @@ enum bt_component_status bt_plugin_register_component_classes(
        assert(plugin && factory);
        return plugin->init(factory);
 }
-
-BT_HIDDEN
-void bt_plugin_get(struct bt_plugin *plugin)
-{
-       if (!plugin) {
-               return;
-       }
-
-       bt_ref_get(&plugin->ref);
-}
-
-BT_HIDDEN
-void bt_plugin_put(struct bt_plugin *plugin)
-{
-       if (!plugin) {
-               return;
-       }
-
-       bt_ref_put(&plugin->ref);
-}
index 38fc3110801662974223dba48a4609e18e621490..2dba33bd432a6bf958ffbf619d3d1af4c11f2e9a 100644 (file)
@@ -26,6 +26,7 @@
  * SOFTWARE.
  */
 
+#include <babeltrace/ref.h>
 #include <babeltrace/compiler.h>
 #include <babeltrace/plugin/source-internal.h>
 #include <babeltrace/plugin/component-internal.h>
@@ -102,6 +103,6 @@ struct bt_notification_iterator *bt_plugin_source_create_iterator(
 end:
        return iterator;
 error:
-       bt_notification_iterator_put(iterator);
-       return NULL;
+       BT_PUT(iterator);
+       return iterator;
 }
This page took 0.03602 seconds and 4 git commands to generate.