diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-04-15 15:48:38 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-04-16 16:41:21 +0200 |
commit | de2126b1821fecbc1f66715714cb34c5c2d14ec4 (patch) | |
tree | 8f58f5c85edd8d9b3a3b829c21f9053fe0eb3493 /tests | |
parent | c712009838f44211958854de431315586995bc61 (diff) |
mqttd: s/errno/SOCKERRNO
To behave proper on Windows
Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/5e855bbd18f84a02c951be7cac6188276818cdac#r38507132
Closes #5241
Diffstat (limited to 'tests')
-rw-r--r-- | tests/server/mqttd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/server/mqttd.c b/tests/server/mqttd.c index 435df69a1..d9ad5923e 100644 --- a/tests/server/mqttd.c +++ b/tests/server/mqttd.c @@ -643,7 +643,7 @@ static bool incoming(curl_socket_t listenfd) logmsg("signalled to die, exiting..."); return FALSE; } - } while((rc == -1) && ((error = errno) == EINTR)); + } while((rc == -1) && ((error = SOCKERRNO) == EINTR)); if(rc < 0) { logmsg("select() failed with error: (%d) %s", @@ -700,9 +700,7 @@ static curl_socket_t sockdaemon(curl_socket_t sock, rc = wait_ms(delay); if(rc) { /* should not happen */ - error = errno; - logmsg("wait_ms() failed with error: (%d) %s", - error, strerror(error)); + logmsg("wait_ms() failed with error: %d", rc); sclose(sock); return CURL_SOCKET_BAD; } |