summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fb14e1f)
raw | patch | inline | side by side (parent: fb14e1f)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 26 Feb 2008 17:15:28 +0000 (18:15 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Wed, 27 Feb 2008 07:21:13 +0000 (08:21 +0100) |
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/rrdtool.c | patch | blob | history |
diff --git a/src/rrdtool.c b/src/rrdtool.c
index 3bb5a9e7ede71ed45b87f09fa3dd2424a305b850..4e34d6ad0aac1bbb93a5c537d58f07e7a559a49c 100644 (file)
--- a/src/rrdtool.c
+++ b/src/rrdtool.c
return (status);
} /* int rrd_write */
+static int rrd_flush (const int timeout)
+{
+ if (cache == NULL)
+ return (0);
+
+ pthread_mutex_lock (&cache_lock);
+ rrd_cache_flush (timeout);
+ pthread_mutex_unlock (&cache_lock);
+ return (0);
+} /* int rrd_flush */
+
static int rrd_config (const char *key, const char *value)
{
if (strcasecmp ("CacheTimeout", key) == 0)
config_keys, config_keys_num);
plugin_register_init ("rrdtool", rrd_init);
plugin_register_write ("rrdtool", rrd_write);
+ plugin_register_flush ("rrdtool", rrd_flush);
plugin_register_shutdown ("rrdtool", rrd_shutdown);
}