From e6491164d8e72989a74ec4ff4e6535fb15f601f8 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 1 Apr 2018 20:12:59 -0700 Subject: Rename SOCK_MESSAGE() to SOCK_DEBUG_MESSAGE(). This emphasizes that it's for *debugging* messages, not for errors sent to the peer or logged to a daemon log file. Any message that would be useful if printed/logged in a production environment should *not* be reported with SOCK_DEBUG_MESSAGE(). --- sockutils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sockutils.c') diff --git a/sockutils.c b/sockutils.c index 420fd5bc..079c49db 100644 --- a/sockutils.c +++ b/sockutils.c @@ -848,7 +848,7 @@ int sock_recv(SOCKET sock, void *buffer, size_t size, int flags, if (size == 0) { - SOCK_MESSAGE("I have been requested to read zero bytes"); + SOCK_DEBUG_MESSAGE("I have been requested to read zero bytes"); return 0; } if (size > INT_MAX) @@ -939,7 +939,7 @@ int sock_recv_dgram(SOCKET sock, void *buffer, size_t size, if (size == 0) { - SOCK_MESSAGE("I have been requested to read zero bytes"); + SOCK_DEBUG_MESSAGE("I have been requested to read zero bytes"); return 0; } if (size > INT_MAX) @@ -1095,7 +1095,7 @@ int sock_discard(SOCKET sock, int size, char *errbuf, int errbuflen) return -1; } - SOCK_MESSAGE("I'm currently discarding data\n"); + SOCK_DEBUG_MESSAGE("I'm currently discarding data\n"); return 0; } @@ -1170,7 +1170,7 @@ int sock_check_hostlist(char *hostlist, const char *sep, struct sockaddr_storage if (errbuf) pcap_snprintf(errbuf, errbuflen, "getaddrinfo() %s", gai_strerror(retval)); - SOCK_MESSAGE(errbuf); + SOCK_DEBUG_MESSAGE(errbuf); /* Get next token */ token = pcap_strtok_r(NULL, sep, &lasts); -- cgit v1.2.3