Merge "fix xff excessive rounding" into collectd-4.10
authorFlorian Forster <octo@collectd.org>
Fri, 26 Aug 2011 12:37:25 +0000 (14:37 +0200)
committerGerrit Code Review <gerrit2@huhu.verplant.org>
Fri, 26 Aug 2011 12:37:25 +0000 (14:37 +0200)
.gitignore
configure.in
contrib/collectd_unixsock.py
src/plugin.c

index e8f9af6..b85bdec 100644 (file)
@@ -33,6 +33,7 @@ src/stamp-h1
 .libs/
 src/collectd
 src/collectd-nagios
+src/collectdctl
 src/collectdmon
 src/*.1
 src/*.5
index d4874bd..254e7fd 100644 (file)
@@ -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.
index ebe040d..1b8e6b1 100644 (file)
@@ -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
index a3f10ae..6d7c96e 100644 (file)
@@ -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);
        }