Don't bail out on transient errors (#2330).

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5572 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2008-12-16 09:36:03 +00:00
1 parent c9952c90a2
commit 2dc03578b3
2 files changed
+17 -16

No files matched your search

+1
View File
@@ -25,6 +25,7 @@ SVN-HEAD
Add lm89, max6658, max6659, max6681, max6646, max6647
and max6649 support
Accept negative temperatures in RRD database
Don't bail out on transient errors (#2330)
Program sensors: Recognize it87 thermal sensor type 4 as thermistor
Add it8720 support
Add lm89, max6658, max6659, max6681, max6646, max6647
+16 -16
View File
@@ -85,27 +85,30 @@ sensord
sensorLog (LOG_INFO, "sensord started");
while (!done && (ret == 0)) {
if (ret == 0)
ret = reloadLib ();
if ((ret == 0) && scanTime) { /* should I scan on the read cycle? */
ret = scanChips ();
if (scanValue <= 0)
scanValue += scanTime;
while (!done) {
ret = reloadLib ();
if (ret)
sensorLog (LOG_NOTICE, "config reload error (%d)", ret);
if (scanTime && (scanValue <= 0)) {
if ((ret = scanChips ()))
sensorLog (LOG_NOTICE, "sensor scan error (%d)", ret);
scanValue += scanTime;
}
if ((ret == 0) && logTime && (logValue <= 0)) {
ret = readChips ();
if (logTime && (logValue <= 0)) {
if ((ret = readChips ()))
sensorLog (LOG_NOTICE, "sensor read error (%d)", ret);
logValue += logTime;
}
if ((ret == 0) && rrdTime && rrdFile && (rrdValue <= 0)) {
ret = rrdUpdate ();
if (rrdTime && rrdFile && (rrdValue <= 0)) {
if ((ret = rrdUpdate ()))
sensorLog (LOG_NOTICE, "rrd update error (%d)", ret);
/*
* The amount of time to wait is computed using the same method as
* in RRD instead of simply adding the interval.
*/
rrdValue = rrdTime - time(NULL) % rrdTime;
}
if (!done && (ret == 0)) {
if (!done) {
int a = logTime ? logValue : INT_MAX;
int b = scanTime ? scanValue : INT_MAX;
int c = (rrdTime && rrdFile) ? rrdValue : INT_MAX;
@@ -117,10 +120,7 @@ sensord
}
}
if (ret)
sensorLog (LOG_INFO, "sensord failed (%d)", ret);
else
sensorLog (LOG_INFO, "sensord stopped");
sensorLog (LOG_INFO, "sensord stopped");
return ret;
}