From: Miroslav Lichvar Date: Tue, 26 Nov 2013 09:34:49 +0000 (+0100) Subject: Enable refclock error messages X-Git-Tag: 1.30-pre1~177 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bc361c48a0949f650c78b8e84d63ace71c616a21;p=thirdparty%2Fchrony.git Enable refclock error messages --- diff --git a/refclock_pps.c b/refclock_pps.c index e747740c..46027bcb 100644 --- a/refclock_pps.c +++ b/refclock_pps.c @@ -134,9 +134,7 @@ static int pps_poll(RCL_Instance instance) ts.tv_nsec = 0; if (time_pps_fetch(pps->handle, PPS_TSFMT_TSPEC, &pps_info, &ts) < 0) { -#if 0 - LOG(LOGS_INFO, LOGF_Refclock, "time_pps_fetch error"); -#endif + LOG(LOGS_ERR, LOGF_Refclock, "time_pps_fetch() failed : %s", strerror(errno)); return 0; } diff --git a/refclock_sock.c b/refclock_sock.c index 73f02bef..8a1f8651 100644 --- a/refclock_sock.c +++ b/refclock_sock.c @@ -57,23 +57,20 @@ static void read_sample(void *anything) s = recv(sockfd, &sample, sizeof (sample), 0); if (s < 0) { -#if 0 - LOG(LOGS_INFO, LOGF_Refclock, "Error reading from SOCK socket : %s", strerror(errno)); -#endif + LOG(LOGS_ERR, LOGF_Refclock, "Could not read SOCK sample : %s", + strerror(errno)); return; } if (s != sizeof (sample)) { -#if 0 - LOG(LOGS_INFO, LOGF_Refclock, "Unexpected length of SOCK sample : %d != %d", s, sizeof (sample)); -#endif + LOG(LOGS_WARN, LOGF_Refclock, "Unexpected length of SOCK sample : %d != %d", + s, sizeof (sample)); return; } if (sample.magic != SOCK_MAGIC) { -#if 0 - LOG(LOGS_INFO, LOGF_Refclock, "Unexpected magic number in SOCK sample : %x != %x", sample.magic, SOCK_MAGIC); -#endif + LOG(LOGS_WARN, LOGF_Refclock, "Unexpected magic number in SOCK sample : %x != %x", + sample.magic, SOCK_MAGIC); return; }