summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d4b6af7)
raw | patch | inline | side by side (parent: d4b6af7)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 30 Jul 2007 18:15:31 +0000 (20:15 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 30 Jul 2007 18:15:31 +0000 (20:15 +0200) |
ChangeLog | patch | blob | history | |
src/sensors.c | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index cd3f54b8bdd8235a522ee26e84a57bae7e510e57..25dcc3ee1925f1f52be9f5321e27ba4555ff3c3a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2007-07-30, Version 4.0.6
+ * sensors plugin: Fix the ignorelist functionality: Only the `type
+ instance' was used to match against the list, but the documentation
+ told otherwise. This release fixes the code, so it complies with the
+ documentation.
+
2007-07-05, Version 4.0.5
* Portability: More fixes for OpenBSD have been included.
diff --git a/src/sensors.c b/src/sensors.c
index e1bc7aafc2100ef2341b990ed7ad9352e2783c30..fde8dcd7ec00e2a93e6d4826a92d0d67775c9cc5 100644 (file)
--- a/src/sensors.c
+++ b/src/sensors.c
const char *type, const char *type_instance,
double val)
{
+ char match_key[1024];
+ int status;
+
value_t values[1];
value_list_t vl = VALUE_LIST_INIT;
- if ((sensor_list != NULL)
- && (ignorelist_match (sensor_list, type_instance)))
+ status = snprintf (match_key, sizeof (match_key), "%s/%s-%s",
+ plugin_instance, type, type_instance);
+ if ((status < 1) || (status >= sizeof (match_key)))
return;
+ match_key[sizeof (match_key) - 1] = '\0';
+
+ if (sensor_list != NULL)
+ {
+ DEBUG ("sensors plugin: Checking ignorelist for `%s'", match_key);
+ if (ignorelist_match (sensor_list, match_key))
+ return;
+ }
values[0].gauge = val;