From: Pavel Rochnyack Date: Wed, 4 Jul 2018 05:00:02 +0000 (+0700) Subject: core: Set 'interval' value in plugin context to match read callback interval X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=799fe057abbbd81b2d0b3e41fb90dd8e52ba4952;p=collectd.git core: Set 'interval' value in plugin context to match read callback interval --- diff --git a/src/daemon/plugin.c b/src/daemon/plugin.c index 92e1ab26..b91672fc 100644 --- a/src/daemon/plugin.c +++ b/src/daemon/plugin.c @@ -1162,6 +1162,7 @@ int plugin_register_read(const char *name, int (*callback)(void)) { rf->rf_name = strdup(name); rf->rf_type = RF_SIMPLE; rf->rf_interval = plugin_get_interval(); + rf->rf_ctx.interval = rf->rf_interval; status = plugin_insert_read(rf); if (status != 0) { @@ -1203,6 +1204,7 @@ int plugin_register_complex_read(const char *group, const char *name, } rf->rf_ctx = plugin_get_ctx(); + rf->rf_ctx.interval = rf->rf_interval; status = plugin_insert_read(rf); if (status != 0) {