Enable refclock error messages

This commit is contained in:
Miroslav Lichvar 2013-11-26 10:34:49 +01:00
parent 1f39169be3
commit bc361c48a0
2 changed files with 7 additions and 12 deletions

View file

@ -134,9 +134,7 @@ static int pps_poll(RCL_Instance instance)
ts.tv_nsec = 0; ts.tv_nsec = 0;
if (time_pps_fetch(pps->handle, PPS_TSFMT_TSPEC, &pps_info, &ts) < 0) { if (time_pps_fetch(pps->handle, PPS_TSFMT_TSPEC, &pps_info, &ts) < 0) {
#if 0 LOG(LOGS_ERR, LOGF_Refclock, "time_pps_fetch() failed : %s", strerror(errno));
LOG(LOGS_INFO, LOGF_Refclock, "time_pps_fetch error");
#endif
return 0; return 0;
} }

View file

@ -57,23 +57,20 @@ static void read_sample(void *anything)
s = recv(sockfd, &sample, sizeof (sample), 0); s = recv(sockfd, &sample, sizeof (sample), 0);
if (s < 0) { if (s < 0) {
#if 0 LOG(LOGS_ERR, LOGF_Refclock, "Could not read SOCK sample : %s",
LOG(LOGS_INFO, LOGF_Refclock, "Error reading from SOCK socket : %s", strerror(errno)); strerror(errno));
#endif
return; return;
} }
if (s != sizeof (sample)) { if (s != sizeof (sample)) {
#if 0 LOG(LOGS_WARN, LOGF_Refclock, "Unexpected length of SOCK sample : %d != %d",
LOG(LOGS_INFO, LOGF_Refclock, "Unexpected length of SOCK sample : %d != %d", s, sizeof (sample)); s, sizeof (sample));
#endif
return; return;
} }
if (sample.magic != SOCK_MAGIC) { if (sample.magic != SOCK_MAGIC) {
#if 0 LOG(LOGS_WARN, LOGF_Refclock, "Unexpected magic number in SOCK sample : %x != %x",
LOG(LOGS_INFO, LOGF_Refclock, "Unexpected magic number in SOCK sample : %x != %x", sample.magic, SOCK_MAGIC); sample.magic, SOCK_MAGIC);
#endif
return; return;
} }