return (register_callback (&list_write, name, (void *) callback));
} /* int plugin_register_write */
-int plugin_register_flush (const char *name, int (*callback) (const int))
+int plugin_register_flush (const char *name,
+ int (*callback) (const int timeout, const char *identifier))
{
return (register_callback (&list_flush, name, (void *) callback));
} /* int plugin_register_flush */
}
} /* void plugin_flush_all */
+int plugin_flush (const char *plugin, int timeout, const char *identifier)
+{
+ int (*callback) (int timeout, const char *identifier);
+ llentry_t *le;
+
+ if (list_flush == NULL)
+ return (0);
+
+ le = llist_head (list_flush);
+ while (le != NULL)
+ {
+ if ((plugin != NULL)
+ && (strcmp (plugin, le->key) != 0))
+ continue;
+
+ callback = (int (*) (int, const char *)) le->value;
+ le = le->next;
+
+ (*callback) (timeout, identifier);
+ }
+} /* int plugin_flush */
+
void plugin_shutdown_all (void)
{
int (*callback) (void);
assert (0 == strcmp (ds->type, vl->type));
#else
if (0 != strcmp (ds->type, vl->type))
- WARN ("plugin_dispatch_values: (ds->type = %s) != (vl->type = %s)",
+ WARNING ("plugin_dispatch_values: (ds->type = %s) != (vl->type = %s)",
ds->type, vl->type);
#endif