From: Florian Forster Date: Fri, 26 Aug 2011 12:37:25 +0000 (+0200) Subject: Merge "fix xff excessive rounding" into collectd-4.10 X-Git-Tag: collectd-4.10.4~7 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=f4c495df1843f5e87f16d122fdc78531ceb2773d;hp=ca86420e6801c5e97cc40176cce27d2b0125a430;p=collectd.git Merge "fix xff excessive rounding" into collectd-4.10 --- diff --git a/.gitignore b/.gitignore index e8f9af66..b85bdec6 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ src/stamp-h1 .libs/ src/collectd src/collectd-nagios +src/collectdctl src/collectdmon src/*.1 src/*.5 diff --git a/configure.in b/configure.in index d4874bde..254e7fdf 100644 --- a/configure.in +++ b/configure.in @@ -1638,7 +1638,8 @@ then [ with_libiptc="yes" with_own_libiptc="yes" - ]) + ], + [-lip4tc -lip6tc]) fi # The system wide version failed for some reason. Check if we have the required # headers to build the shipped version. diff --git a/contrib/collectd_unixsock.py b/contrib/collectd_unixsock.py index ebe040d6..1b8e6b17 100644 --- a/contrib/collectd_unixsock.py +++ b/contrib/collectd_unixsock.py @@ -68,8 +68,9 @@ class Collectd(): """ numvalues = self._cmd('GETTHRESHOLD "%s"' % identifier) lines = [] - if numvalues: - lines = self._readlines(numvalues) + if not numvalues or numvalues < 0: + raise KeyError("Identifier '%s' not found" % identifier) + lines = self._readlines(numvalues) return lines def getval(self, identifier, flush_after=True): @@ -83,8 +84,9 @@ class Collectd(): """ numvalues = self._cmd('GETVAL "%s"' % identifier) lines = [] - if numvalues: - lines = self._readlines(numvalues) + if not numvalues or numvalues < 0: + raise KeyError("Identifier '%s' not found" % identifier) + lines = self._readlines(numvalues) if flush_after: self.flush(identifiers=[identifier]) return lines diff --git a/src/plugin.c b/src/plugin.c index a3f10ae2..6d7c96e4 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -1358,7 +1358,8 @@ int plugin_dispatch_values (value_list_t *vl) if ((vl == NULL) || (vl->type[0] == 0) || (vl->values == NULL) || (vl->values_len < 1)) { - ERROR ("plugin_dispatch_values: Invalid value list."); + ERROR ("plugin_dispatch_values: Invalid value list " + "from plugin %s.", vl->plugin); return (-1); }