From: Sebastian Harl Date: Fri, 18 Apr 2014 12:42:08 +0000 (+0200) Subject: plugin: Only log a message when actually unloading a module. X-Git-Tag: sysdb-0.1.0~120 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7261c016072283d7dce6e4fbac52e6b9c696d015;p=sysdb.git plugin: Only log a message when actually unloading a module. --- diff --git a/src/core/plugin.c b/src/core/plugin.c index 6f6beeb..18ea82c 100644 --- a/src/core/plugin.c +++ b/src/core/plugin.c @@ -239,8 +239,10 @@ plugin_unregister_by_name(const char *plugin_name) } } - sdb_log(SDB_LOG_INFO, "core: Unloading module %s", plugin_name); obj = sdb_llist_remove_by_name(all_plugins, plugin_name); + if (obj->ref_cnt <= 1) + sdb_log(SDB_LOG_INFO, "core: Unloading module %s", plugin_name); + /* else: other callbacks still reference it */ sdb_object_deref(obj); } /* plugin_unregister_by_name */