From: Mariusz Szafranski Date: Thu, 1 Mar 2018 12:09:19 +0000 (+0000) Subject: ipmi plugin: Threshold event handler registration fix X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d9dd26e014e484a388745b22e76991fe27ac7eef;p=collectd.git ipmi plugin: Threshold event handler registration fix This patch fixes registration of threshold event handler for specific sensor types (e.g. 'System Airflow') Change-Id: I437f3fe68fecf264adb32a4e2ef4ac214a7e87a4 Signed-off-by: Mariusz Szafranski --- diff --git a/src/ipmi.c b/src/ipmi.c index f64e6177..a8805866 100644 --- a/src/ipmi.c +++ b/src/ipmi.c @@ -794,11 +794,9 @@ entity_sensor_update_handler(enum ipmi_update_e op, if (st->sel_enabled) { int status = 0; - /* register threshold event if threshold sensor support events */ - if ((ipmi_sensor_get_event_reading_type(sensor) == - IPMI_EVENT_READING_TYPE_THRESHOLD) && - (ipmi_sensor_get_threshold_access(sensor) != - IPMI_THRESHOLD_ACCESS_SUPPORT_NONE)) + /* register threshold event handler */ + if (ipmi_sensor_get_event_reading_type(sensor) == + IPMI_EVENT_READING_TYPE_THRESHOLD) status = ipmi_sensor_add_threshold_event_handler( sensor, sensor_threshold_event_handler, st); /* register discrete handler if discrete/specific sensor support events */