From: Florian Forster Date: Thu, 21 Sep 2017 15:22:39 +0000 (+0200) Subject: Merge branch 'collectd-5.6' into collectd-5.7 X-Git-Tag: collectd-5.8.0~1^2~15 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=01d23e3f5daf016d03f82d92a76be2fe3decdca4;hp=8339b50c3c2c4ca61e87a43a62c23bd53271a4ad;p=collectd.git Merge branch 'collectd-5.6' into collectd-5.7 --- diff --git a/contrib/redhat/collectd.spec b/contrib/redhat/collectd.spec index 1cf2e31c..9f93f410 100644 --- a/contrib/redhat/collectd.spec +++ b/contrib/redhat/collectd.spec @@ -501,8 +501,8 @@ the byte- and packet-counters of selected rules and submit them to collectd. Summary: Java plugin for collectd Group: System Environment/Daemons Requires: %{name}%{?_isa} = %{version}-%{release} -BuildRequires: java-devel, jpackage-utils -Requires: java, jpackage-utils +BuildRequires: java-devel >= 1.6, jpackage-utils >= 1.6 +Requires: java >= 1.6, jpackage-utils >= 1.6 %description java This plugin for collectd allows plugins to be written in Java and executed in an embedded JVM. diff --git a/src/network.c b/src/network.c index f93f49c7..e28316d5 100644 --- a/src/network.c +++ b/src/network.c @@ -1230,9 +1230,9 @@ static int parse_part_encr_aes256(sockent_t *se, /* {{{ */ part_size - buffer_offset, /* in = */ NULL, /* in len = */ 0); if (err != 0) { - sfree(pea.username); ERROR("network plugin: gcry_cipher_decrypt returned: %s. Username: %s", gcry_strerror(err), pea.username); + sfree(pea.username); return (-1); } @@ -1254,8 +1254,6 @@ static int parse_part_encr_aes256(sockent_t *se, /* {{{ */ parse_packet(se, buffer + buffer_offset, payload_len, flags | PP_ENCRYPTED, pea.username); - /* XXX: Free pea.username?!? */ - /* Update return values */ *ret_buffer = buffer + part_size; *ret_buffer_len = buffer_len - part_size; diff --git a/src/ntpd.c b/src/ntpd.c index 1dc1857b..bc81cdd8 100644 --- a/src/ntpd.c +++ b/src/ntpd.c @@ -850,9 +850,9 @@ static int ntpd_read(void) { } /* kerninfo -> estimated error */ - offset_loop = scale_loop * ((gauge_t)ntohl(ik->offset)); + offset_loop = (gauge_t)((int32_t)ntohl(ik->offset) * scale_loop); freq_loop = ntpd_read_fp(ik->freq); - offset_error = scale_error * ((gauge_t)ntohl(ik->esterror)); + offset_error = (gauge_t)((int32_t)ntohl(ik->esterror) * scale_error); DEBUG("info_kernel:\n" " pll offset = %.8g\n" diff --git a/src/perl.c b/src/perl.c index ea53fbf3..f58e02ab 100644 --- a/src/perl.c +++ b/src/perl.c @@ -2618,6 +2618,12 @@ static int perl_config_plugin(pTHX_ oconfig_item_t *ci) { char *plugin; HV *config; + if (NULL == perl_threads) { + log_err("A `Plugin' block was encountered but no plugin was loaded yet. " + "Put the appropriate `LoadPlugin' option in front of it."); + return -1; + } + dSP; if ((1 != ci->values_num) || (OCONFIG_TYPE_STRING != ci->values[0].type)) {