Ticket #2895: cpu_temp.diff

File cpu_temp.diff, 1.1 KB (added by skamithi, 17 years ago)

add qmutex lock/unlocking around lmsensor calls.

  • httpstatus.cpp

     
    15491549        acpiTempFile.close();
    15501550    }                                                 
    15511551
    1552 #ifdef HAVE_LMSENSORS
     1552#ifdef HAVE_LMSENSORS
     1553    tempSettingLock.lock();
    15531554    if (!found_acpi)
    15541555    {
    15551556        int chip_nr, a, b;
     
    15831584        } 
    15841585        sensors_cleanup();
    15851586    }
     1587    tempSettingLock.unlock();
    15861588#endif
    15871589
    15881590    // Guide Data ---------------------
  • httpstatus.h

     
    200200        int     PrintScheduled    ( QTextStream &os, QDomElement scheduled );
    201201        int     PrintJobQueue     ( QTextStream &os, QDomElement jobs );
    202202        int     PrintMachineInfo  ( QTextStream &os, QDomElement info );
     203        QMutex  tempSettingLock;
    203204
    204205    public:
    205206                 HttpStatus( QMap<int, EncoderLink *> *tvList, Scheduler *sched, AutoExpire *expirer, bool bIsMaster );