From: Pavel Rochnyack Date: Wed, 4 Jul 2018 05:43:10 +0000 (+0700) Subject: core: Set plugin name in context when plugin is autoloaded X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=62e9fd1e6b8e29d187f771f82820a3070bec0156;p=collectd.git core: Set plugin name in context when plugin is autoloaded --- diff --git a/src/daemon/configfile.c b/src/daemon/configfile.c index d9038002..8750bef8 100644 --- a/src/daemon/configfile.c +++ b/src/daemon/configfile.c @@ -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);