]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Enable refclock error messages
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 26 Nov 2013 09:34:49 +0000 (10:34 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 26 Nov 2013 10:44:06 +0000 (11:44 +0100)
refclock_pps.c
refclock_sock.c

index e747740cb498e4b494640fd612e054f82ae4c8a6..46027bcb3a4f05b5f9d55a1545e35597bae17002 100644 (file)
@@ -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;
   }
 
index 73f02befdfe329e698d7aca3950db774d11a2ec6..8a1f86513c90d35df9764c9195a4394f8f3c106d 100644 (file)
@@ -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;
   }