From: Pavel Rochnyack Date: Wed, 2 Aug 2017 05:15:50 +0000 (+0700) Subject: perl plugin: Added check of proper interpreter initialization. X-Git-Tag: collectd-5.6.3~7^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=3e0d21f0139269625f5abcf5e6a582d0867e6733;p=collectd.git perl plugin: Added check of proper interpreter initialization. Closes: #927 --- diff --git a/src/perl.c b/src/perl.c index d01f5c7c..66ad1819 100644 --- a/src/perl.c +++ b/src/perl.c @@ -2398,6 +2398,12 @@ static int perl_config_plugin(pTHX_ oconfig_item_t *ci) { char *plugin; HV *config; + if (NULL == perl_threads) { + log_err("No plugins was loaded yet! Put your plugin configuration block " + "after relevant `LoadPlugin' option."); + return -1; + } + dSP; if ((1 != ci->values_num) || (OCONFIG_TYPE_STRING != ci->values[0].type)) {