summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bde8c64)
raw | patch | inline | side by side (parent: bde8c64)
author | Florian Forster <octo@collectd.org> | |
Wed, 10 Jun 2015 06:55:02 +0000 (07:55 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Wed, 10 Jun 2015 07:00:14 +0000 (08:00 +0100) |
Fixes: #1069
src/configfile.c | patch | blob | history |
diff --git a/src/configfile.c b/src/configfile.c
index ec39b76034fa21c8d8a9f4c066f0419d6f0bcb79..d61bc88fef349ee537a35cb39257068637f6b6b2 100644 (file)
--- a/src/configfile.c
+++ b/src/configfile.c
if (IS_TRUE (global_option_get ("AutoLoadPlugin")))
{
+ plugin_ctx_t ctx;
+ plugin_ctx_t old_ctx;
int status;
+ /* default to the global interval set before loading this plugin */
+ memset (&ctx, 0, sizeof (ctx));
+ ctx.interval = cf_get_default_interval ();
+
+ old_ctx = plugin_set_ctx (ctx);
status = plugin_load (name, /* flags = */ 0);
+ /* reset to the "global" context */
+ plugin_set_ctx (old_ctx);
+
if (status != 0)
{
ERROR ("Automatically loading plugin \"%s\" failed "