]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
refclock_sock: downgrade error messages to debug messages
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 20 Jun 2018 14:37:57 +0000 (16:37 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 20 Jun 2018 14:57:24 +0000 (16:57 +0200)
Turn error messages which are not expected to happen with a correctly
working SOCK client into debug messages.

refclock_sock.c

index 51c49976d0b61e7742e2720f730a6afe80e43490..4e8f2b222de4675457470afd993f0f548aeda9c8 100644 (file)
@@ -69,20 +69,19 @@ static void read_sample(int sockfd, int event, void *anything)
   s = recv(sockfd, &sample, sizeof (sample), 0);
 
   if (s < 0) {
-    LOG(LOGS_ERR, "Could not read SOCK sample : %s",
-        strerror(errno));
+    DEBUG_LOG("Could not read SOCK sample : %s", strerror(errno));
     return;
   }
 
   if (s != sizeof (sample)) {
-    LOG(LOGS_WARN, "Unexpected length of SOCK sample : %d != %ld",
-        s, (long)sizeof (sample));
+    DEBUG_LOG("Unexpected length of SOCK sample : %d != %ld",
+              s, (long)sizeof (sample));
     return;
   }
 
   if (sample.magic != SOCK_MAGIC) {
-    LOG(LOGS_WARN, "Unexpected magic number in SOCK sample : %x != %x",
-        (unsigned int)sample.magic, (unsigned int)SOCK_MAGIC);
+    DEBUG_LOG("Unexpected magic number in SOCK sample : %x != %x",
+              (unsigned int)sample.magic, (unsigned int)SOCK_MAGIC);
     return;
   }