From e9098203f7df0a3c30db2c07cebfc3a9680f7c06 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 27 Oct 2009 18:25:19 +0000 Subject: [PATCH] Fix from Chris Davis: get error-logging to be happy on win32. svn:r1473 --- test/regress_util.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/regress_util.c b/test/regress_util.c index 4593a432..30ba0964 100644 --- a/test/regress_util.c +++ b/test/regress_util.c @@ -412,8 +412,9 @@ test_evutil_log(void *ptr) fd = socket(AF_INET, SOCK_STREAM, 0); #ifdef WIN32 evutil_snprintf(buf, sizeof(buf), - "Unhappy socket: Resource temporarily unavailable"); - EVUTIL_SET_SOCKET_ERROR(fd, WSAEWOULDBLOCK); + "Unhappy socket: %s", + evutil_socket_error_to_string(WSAEWOULDBLOCK)); + EVUTIL_SET_SOCKET_ERROR(WSAEWOULDBLOCK); #else evutil_snprintf(buf, sizeof(buf), "Unhappy socket: %s", strerror(EAGAIN)); @@ -425,7 +426,7 @@ test_evutil_log(void *ptr) RESET(); #ifdef WIN32 - EVUTIL_SET_SOCKET_ERROR(fd, WSAEWOULDBLOCK); + EVUTIL_SET_SOCKET_ERROR(WSAEWOULDBLOCK); #else errno = EAGAIN; #endif