From 9949aa0b97e44d67713eed79859028c5ba92b1a3 Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Sun, 15 Oct 2006 18:38:06 +0000 Subject: More hddtemp fixes (shouldn't fail anymore) --- hardinfo2/arch/linux/common/sensors.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'hardinfo2/arch/linux/common') diff --git a/hardinfo2/arch/linux/common/sensors.h b/hardinfo2/arch/linux/common/sensors.h index 946de968..652273d2 100644 --- a/hardinfo2/arch/linux/common/sensors.h +++ b/hardinfo2/arch/linux/common/sensors.h @@ -276,7 +276,7 @@ read_sensors_hddtemp(void) gint len = 0; if ((s = sock_connect("127.0.0.1", 7634))) { - while (len <= 2) + while (!len) len = sock_read(s, buffer, sizeof(buffer)); sock_close(s); @@ -309,13 +309,10 @@ read_sensors_hddtemp(void) } g_strfreev(disks); - } else { - /* FIXME: This might go crazy in an infinite loop. */ - g_warning("reading hddtemp failed. retrying in 100ms"); - nonblock_sleep(100); - read_sensors_hddtemp(); - return; } + } else { + g_free(old); + old = NULL; } if (old) { -- cgit v1.2.3