Changeset 5572

Show
Ignore:
Timestamp:
12/16/08 10:36:03 (4 years ago)
Author:
khali
Message:

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

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r5565 r5572  
    2626                    and max6649 support 
    2727                   Accept negative temperatures in RRD database 
     28                   Don't bail out on transient errors (#2330) 
    2829  Program sensors: Recognize it87 thermal sensor type 4 as thermistor 
    2930                   Add it8720 support 
  • lm-sensors/trunk/prog/sensord/sensord.c

    r4887 r5572  
    8686  sensorLog (LOG_INFO, "sensord started"); 
    8787 
    88   while (!done && (ret == 0)) { 
    89     if (ret == 0) 
    90       ret = reloadLib (); 
    91     if ((ret == 0) && scanTime) { /* should I scan on the read cycle? */ 
    92       ret = scanChips (); 
    93       if (scanValue <= 0) 
    94         scanValue += scanTime; 
    95     } 
    96     if ((ret == 0) && logTime && (logValue <= 0)) { 
    97       ret = readChips (); 
     88  while (!done) { 
     89    ret = reloadLib (); 
     90    if (ret) 
     91      sensorLog (LOG_NOTICE, "config reload error (%d)", ret); 
     92    if (scanTime && (scanValue <= 0)) { 
     93      if ((ret = scanChips ())) 
     94        sensorLog (LOG_NOTICE, "sensor scan error (%d)", ret); 
     95      scanValue += scanTime; 
     96    } 
     97    if (logTime && (logValue <= 0)) { 
     98      if ((ret = readChips ())) 
     99        sensorLog (LOG_NOTICE, "sensor read error (%d)", ret); 
    98100      logValue += logTime; 
    99101    } 
    100     if ((ret == 0) && rrdTime && rrdFile && (rrdValue <= 0)) { 
    101       ret = rrdUpdate (); 
     102    if (rrdTime && rrdFile && (rrdValue <= 0)) { 
     103      if ((ret = rrdUpdate ())) 
     104        sensorLog (LOG_NOTICE, "rrd update error (%d)", ret); 
    102105      /* 
    103106       * The amount of time to wait is computed using the same method as 
     
    106109      rrdValue = rrdTime - time(NULL) % rrdTime; 
    107110    } 
    108     if (!done && (ret == 0)) { 
     111    if (!done) { 
    109112      int a = logTime ? logValue : INT_MAX; 
    110113      int b = scanTime ? scanValue : INT_MAX; 
     
    118121  } 
    119122 
    120   if (ret) 
    121     sensorLog (LOG_INFO, "sensord failed (%d)", ret); 
    122   else 
    123     sensorLog (LOG_INFO, "sensord stopped"); 
     123  sensorLog (LOG_INFO, "sensord stopped"); 
    124124 
    125125  return ret;