diff options
author | Ondrej Čerman <ondrej.cerman@gmail.com> | 2018-11-04 21:58:31 +0100 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2018-11-04 15:00:20 -0800 |
commit | 83c325d54efa1187a27fe0aa9709752087d5fe97 (patch) | |
tree | f4fba8995361e302f8873610c1932a8a9fc92314 /modules | |
parent | 0153d0af6c9ddca43c14d62a9e33e2b0c2ba724e (diff) |
devices/sensors: bug fix - read_sensor_labels never gets called
Diffstat (limited to 'modules')
-rw-r--r-- | modules/devices/sensors.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/devices/sensors.c b/modules/devices/sensors.c index de89b1bf..e66aac67 100644 --- a/modules/devices/sensors.c +++ b/modules/devices/sensors.c @@ -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; @@ -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); } @@ -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) { |