X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fcore%2Fplugin.c;h=bf0bdb34a20af428c73ab63250c7b0f4d3f4c00b;hb=bf21a7947536605030c9ad409608dd0f3c8fc325;hp=da77f8e57a637426894a1a425498b0216cd8ff7c;hpb=31d068952acfc37aae3d534ec42bce439423e71d;p=sysdb.git diff --git a/src/core/plugin.c b/src/core/plugin.c index da77f8e..bf0bdb3 100644 --- a/src/core/plugin.c +++ b/src/core/plugin.c @@ -251,26 +251,6 @@ plugin_unregister_by_name(const char *plugin_name) /* else: other callbacks still reference it */ } /* plugin_unregister_by_name */ -static void -plugin_unregister_all(void) -{ - size_t i; - - for (i = 0; i < SDB_STATIC_ARRAY_LEN(all_lists); ++i) { - const char *type = all_lists[i].type; - sdb_llist_t *list = *all_lists[i].list; - - size_t len = sdb_llist_len(list); - - if (! len) - continue; - - sdb_llist_clear(list); - sdb_log(SDB_LOG_INFO, "core: Unregistered %zu %s callback%s", - len, type, len == 1 ? "" : "s"); - } -} /* plugin_unregister_all */ - /* * private types */ @@ -889,6 +869,26 @@ sdb_plugin_register_writer(const char *name, return 0; } /* sdb_store_register_writer */ +void +sdb_plugin_unregister_all(void) +{ + size_t i; + + for (i = 0; i < SDB_STATIC_ARRAY_LEN(all_lists); ++i) { + const char *type = all_lists[i].type; + sdb_llist_t *list = *all_lists[i].list; + + size_t len = sdb_llist_len(list); + + if (! len) + continue; + + sdb_llist_clear(list); + sdb_log(SDB_LOG_INFO, "core: Unregistered %zu %s callback%s", + len, type, len == 1 ? "" : "s"); + } +} /* sdb_plugin_unregister_all */ + sdb_plugin_ctx_t sdb_plugin_get_ctx(void) { @@ -997,7 +997,7 @@ sdb_plugin_reconfigure_init(void) CTX(sdb_llist_iter_get_next(iter))->use_cnt = 0; sdb_llist_iter_destroy(iter); - plugin_unregister_all(); + sdb_plugin_unregister_all(); return 0; } /* sdb_plugin_reconfigure_init */