From: Sebastian Harl Date: Thu, 21 Aug 2008 09:15:02 +0000 (+0200) Subject: Replaced plugin_flush_all(t) with plugin_flush(NULL, t, NULL). X-Git-Tag: collectd-4.5.0~56 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=2aaabc7592009a1f6e2d6033a79d3041b05ab500;p=collectd.git Replaced plugin_flush_all(t) with plugin_flush(NULL, t, NULL). There is nothing that plugin_flush_all() would do but plugin_flush() wouldn't, so this was redundant. plugin_flush_all() has been removed completely. Signed-off-by: Sebastian Harl Signed-off-by: Florian Forster --- diff --git a/src/collectd.c b/src/collectd.c index 5484322f..71eb940f 100644 --- a/src/collectd.c +++ b/src/collectd.c @@ -50,7 +50,7 @@ static int loop = 0; static void *do_flush (void *arg) { INFO ("Flushing all data."); - plugin_flush_all (-1); + plugin_flush (NULL, -1, NULL); INFO ("Finished flushing all data."); pthread_exit (NULL); return NULL; diff --git a/src/plugin.c b/src/plugin.c index c47e8678..b3feb17a 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -665,24 +665,6 @@ void plugin_read_all (void) pthread_mutex_unlock (&read_lock); } /* void plugin_read_all */ -void plugin_flush_all (int timeout) -{ - int (*callback) (int timeout, const char *identifier); - llentry_t *le; - - if (list_flush == NULL) - return; - - le = llist_head (list_flush); - while (le != NULL) - { - callback = (int (*) (int, const char *)) le->value; - le = le->next; - - (*callback) (timeout, NULL); - } -} /* void plugin_flush_all */ - int plugin_flush (const char *plugin, int timeout, const char *identifier) { int (*callback) (int timeout, const char *identifier); diff --git a/src/plugin.h b/src/plugin.h index f66ed3e2..3ffde461 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -178,7 +178,6 @@ void plugin_init_all (void); void plugin_read_all (void); void plugin_shutdown_all (void); -void plugin_flush_all (int timeout); int plugin_flush (const char *plugin, int timeout, const char *identifier); /* diff --git a/src/utils_cmd_flush.c b/src/utils_cmd_flush.c index 74807b84..0e7b350f 100644 --- a/src/utils_cmd_flush.c +++ b/src/utils_cmd_flush.c @@ -164,7 +164,7 @@ int handle_flush (FILE *fh, char *buffer) } else { - plugin_flush_all (timeout); + plugin_flush (NULL, timeout, NULL); print_to_socket (fh, "0 Done\n"); }