aboutsummaryrefslogtreecommitdiff
path: root/sockutils.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-04-01 20:12:59 -0700
committerGuy Harris <guy@alum.mit.edu>2018-04-01 20:12:59 -0700
commite6491164d8e72989a74ec4ff4e6535fb15f601f8 (patch)
tree00840f8894bab78a0a221f297af787290925862a /sockutils.h
parentb93d911845e18343d1276b134cafd9202ed0ab9f (diff)
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().
Diffstat (limited to 'sockutils.h')
-rw-r--r--sockutils.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sockutils.h b/sockutils.h
index 6c7198df..1df1ef7b 100644
--- a/sockutils.h
+++ b/sockutils.h
@@ -139,15 +139,15 @@ int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD,
* \return No return values.
*/
#ifdef NDEBUG
- #define SOCK_MESSAGE(msg) ((void)0)
+ #define SOCK_DEBUG_MESSAGE(msg) ((void)0)
#else
#if (defined(_WIN32) && defined(_MSC_VER))
#include <crtdbg.h> /* for _CrtDbgReport */
/* Use MessageBox(NULL, msg, "warning", MB_OK)' instead of the other calls if you want to debug a Win32 service */
/* Remember to activate the 'allow service to interact with desktop' flag of the service */
- #define SOCK_MESSAGE(msg) { _CrtDbgReport(_CRT_WARN, NULL, 0, NULL, "%s\n", msg); fprintf(stderr, "%s\n", msg); }
+ #define SOCK_DEBUG_MESSAGE(msg) { _CrtDbgReport(_CRT_WARN, NULL, 0, NULL, "%s\n", msg); fprintf(stderr, "%s\n", msg); }
#else
- #define SOCK_MESSAGE(msg) { fprintf(stderr, "%s\n", msg); }
+ #define SOCK_DEBUG_MESSAGE(msg) { fprintf(stderr, "%s\n", msg); }
#endif
#endif