X-Git-Url: http://git.wpitchoune.net/gitweb/?p=psensor-pkg-ubuntu.git;a=blobdiff_plain;f=src%2Flib%2Fslog.c;h=15ccd0b8ddd8b2e854c47095cc9d39b3cdc48013;hp=99eb536d1954a9996163bd112ded7089ef9bb1d8;hb=4c50d430bea4b8462b0ae7ab70baf3f538f87718;hpb=0470c31b8a4293914a6fd9b089503775706da084 diff --git a/src/lib/slog.c b/src/lib/slog.c index 99eb536..15ccd0b 100644 --- a/src/lib/slog.c +++ b/src/lib/slog.c @@ -34,6 +34,7 @@ #include "bool.h" #include "config.h" #include +#include #include "ptime.h" #include "slog.h" @@ -133,7 +134,7 @@ static void slog_write_sensors(struct psensor **sensors) bool first_call; if (!file) { - log_err(_("Sensor log file not open.")); + log_debug(_("Sensor log file not open.")); return ; } @@ -169,9 +170,9 @@ static void *slog_routine(void *data) { while (1) { pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); - pthread_mutex_lock(sensors_mutex); + pmutex_lock(sensors_mutex); slog_write_sensors(sensors); - pthread_mutex_unlock(sensors_mutex); + pmutex_unlock(sensors_mutex); pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); sleep(period); }