]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
core: Set plugin name in context when plugin is autoloaded
authorPavel Rochnyack <pavel2000@ngs.ru>
Wed, 4 Jul 2018 05:43:10 +0000 (12:43 +0700)
committerPavel Rochnyack <pavel2000@ngs.ru>
Wed, 4 Jul 2018 05:43:10 +0000 (12:43 +0700)
src/daemon/configfile.c

index d9038002ad2d418105037287a1f60c352327ee0f..8750bef87b84a45313e82004319945815f2b74ad 100644 (file)
@@ -381,6 +381,7 @@ static int dispatch_block_plugin(oconfig_item_t *ci) {
 
     /* default to the global interval set before loading this plugin */
     ctx.interval = cf_get_default_interval();
+    ctx.name = strdup(name);
 
     old_ctx = plugin_set_ctx(ctx);
     status = plugin_load(name, /* flags = */ false);