From: Florian Forster Date: Tue, 27 Mar 2007 14:31:01 +0000 (+0200) Subject: plugin.[ch]: Implemented `plugin_unregister_config'. X-Git-Tag: collectd-4.0.0~132 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=abba9553ff446ea56620a811d5b218e842c1d5ee;p=collectd.git plugin.[ch]: Implemented `plugin_unregister_config'. --- diff --git a/src/configfile.c b/src/configfile.c index d636c8c7..eca3dfc0 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -338,7 +338,7 @@ void cf_unregister (const char *type) free (this); break; } -} +} /* void cf_unregister */ void cf_register (const char *type, int (*callback) (const char *, const char *), diff --git a/src/plugin.c b/src/plugin.c index 85a54edf..60cd37f4 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -290,6 +290,12 @@ int plugin_register_log (char *name, return (register_callback (&list_log, name, (void *) callback)); } /* int plugin_register_log */ +int plugin_unregister_config (const char *name) +{ + cf_unregister (name); + return (0); +} /* int plugin_unregister_config */ + int plugin_unregister_init (const char *name) { return (plugin_unregister (list_init, name)); diff --git a/src/plugin.h b/src/plugin.h index f88bc48a..ba6cde28 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -154,6 +154,7 @@ int plugin_register_data_set (const data_set_t *ds); int plugin_register_log (char *name, void (*callback) (int, const char *)); +int plugin_unregister_config (const char *name); int plugin_unregister_init (const char *name); int plugin_unregister_read (const char *name); int plugin_unregister_write (const char *name);