aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/arch/linux/common/sensors.h
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2006-10-15 18:38:06 +0000
committerLeandro A. F. Pereira <leandro@hardinfo.org>2006-10-15 18:38:06 +0000
commit9949aa0b97e44d67713eed79859028c5ba92b1a3 (patch)
tree861bd54794d7e4cac1b2aca17089371dd4b2bfe4 /hardinfo2/arch/linux/common/sensors.h
parentf17b415f930f3926cb5099dd8c88cd99259d6b26 (diff)
More hddtemp fixes (shouldn't fail anymore)
Diffstat (limited to 'hardinfo2/arch/linux/common/sensors.h')
-rw-r--r--hardinfo2/arch/linux/common/sensors.h11
1 files changed, 4 insertions, 7 deletions
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) {