author | Florian Forster <octo@collectd.org> | |
Fri, 26 Aug 2011 12:37:25 +0000 (14:37 +0200) | ||
committer | Gerrit Code Review <gerrit2@huhu.verplant.org> | |
Fri, 26 Aug 2011 12:37:25 +0000 (14:37 +0200) |
.gitignore | patch | blob | history | |
configure.in | patch | blob | history | |
contrib/collectd_unixsock.py | patch | blob | history | |
src/plugin.c | patch | blob | history |
diff --git a/.gitignore b/.gitignore
index e8f9af66d7879336910ff56dd76f8b70d796dd23..b85bdec680ee0f1f2342be127cd25fce740605af 100644 (file)
--- a/.gitignore
+++ b/.gitignore
.libs/
src/collectd
src/collectd-nagios
+src/collectdctl
src/collectdmon
src/*.1
src/*.5
diff --git a/configure.in b/configure.in
index d4874bde448fab657b82e81c4f676c3b3ea906f0..254e7fdfaa936a8a128ef11fc0c24ebae142269a 100644 (file)
--- a/configure.in
+++ b/configure.in
[
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 ebe040d6a11846ab77fe446112668e29354f904f..1b8e6b174ed8d8ad1a7abc1237842e03d5908075 100644 (file)
"""
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):
"""
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 a3f10ae2b4952e954f0213f9edac18e9ce3e869c..6d7c96e4e8862784ba3b1f3a4737057bd8701688 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
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);
}