From: Miroslav Lichvar Date: Wed, 20 Jun 2018 14:37:57 +0000 (+0200) Subject: refclock_sock: downgrade error messages to debug messages X-Git-Tag: 3.4-pre1~78 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=e15c7cd236c50247c26640f71bce1c2b292fc567;p=thirdparty%2Fchrony.git refclock_sock: downgrade error messages to debug messages Turn error messages which are not expected to happen with a correctly working SOCK client into debug messages. --- diff --git a/refclock_sock.c b/refclock_sock.c index 51c49976..4e8f2b22 100644 --- a/refclock_sock.c +++ b/refclock_sock.c @@ -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; }