return (0);
} /* int plugin_register_config */
+int plugin_register_complex_config (const char *type,
+ int (*callback) (oconfig_item_t *))
+{
+ return (cf_register_complex (type, callback));
+} /* int plugin_register_complex_config */
+
int plugin_register_init (const char *name,
int (*callback) (void))
{
return (0);
} /* int plugin_unregister_config */
+int plugin_unregister_complex_config (const char *name)
+{
+ cf_unregister_complex (name);
+ return (0);
+} /* int plugin_unregister_complex_config */
+
int plugin_unregister_init (const char *name)
{
return (plugin_unregister (list_init, name));
while (le != NULL)
{
callback = (int (*) (void)) le->value;
- (*callback) ();
+ /* Advance the pointer before calling the callback allows
+ * shutdown functions to unregister themselves. If done the
+ * other way around the memory `le' points to will be freed
+ * after callback returns. */
le = le->next;
+
+ (*callback) ();
}
} /* void plugin_shutdown_all */