summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3b293a7)
raw | patch | inline | side by side (parent: 3b293a7)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 21 Aug 2008 09:15:02 +0000 (11:15 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Thu, 21 Aug 2008 09:55:59 +0000 (11:55 +0200) |
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 <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
so this was redundant.
plugin_flush_all() has been removed completely.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/collectd.c | patch | blob | history | |
src/plugin.c | patch | blob | history | |
src/plugin.h | patch | blob | history | |
src/utils_cmd_flush.c | patch | blob | history |
diff --git a/src/collectd.c b/src/collectd.c
index 5484322f16eb5feabe8dce1039db7fcda56932cf..71eb940fb3251b6ffee1af4829fdc92c915460ce 100644 (file)
--- a/src/collectd.c
+++ b/src/collectd.c
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 c47e8678d4c6ac8acbe27cafdd2b7b63c8fb9124..b3feb17a6f59cbf83180dc13117088c54654a2c8 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
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 f66ed3e22e476694fa8e03f6f76cdec9080478c7..3ffde461b07da1baf684a2189bf0f6eba90e6214 100644 (file)
--- a/src/plugin.h
+++ b/src/plugin.h
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 74807b84395901d44935cdab9760edd740cdf2f7..0e7b350f581f02f07ccaf234c1ec0c225011b33d 100644 (file)
--- a/src/utils_cmd_flush.c
+++ b/src/utils_cmd_flush.c
}
else
{
- plugin_flush_all (timeout);
+ plugin_flush (NULL, timeout, NULL);
print_to_socket (fh, "0 Done\n");
}