Skip to content

Commit

Permalink
devices/sensors: bug fix - read_sensor_labels never gets called
Browse files Browse the repository at this point in the history
  • Loading branch information
ocerman authored and lpereira committed Nov 4, 2018
1 parent 0153d0a commit 83c325d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/devices/sensors.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
gchar *sensors = NULL;
GHashTable *sensor_compute = NULL;
GHashTable *sensor_labels = NULL;
gboolean hwmon_first_run = TRUE;

static void read_sensor_labels(gchar *driver) {
FILE *conf;
Expand Down Expand Up @@ -264,7 +265,7 @@ static void read_sensors_hwmon(void) {

driver = determine_driver_for_hwmon_path(path_hwmon);
DEBUG("hwmon%d has driver=%s", hwmon, driver);
if (!sensor_labels) {
if (hwmon_first_run) {
read_sensor_labels(driver);
}

Expand Down Expand Up @@ -312,9 +313,9 @@ static void read_sensors_hwmon(void) {

path_hwmon = get_sensor_path(++hwmon, *prefix);
}

g_free(path_hwmon);
}
hwmon_first_run = FALSE;
}

static void read_sensors_acpi(void) {
Expand Down

0 comments on commit 83c325d

Please sign in to comment.