From e15c7cd236c50247c26640f71bce1c2b292fc567 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 20 Jun 2018 16:37:57 +0200 Subject: [PATCH] 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. --- refclock_sock.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/refclock_sock.c b/refclock_sock.c index 51c4997..4e8f2b2 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; }