aboutsummaryrefslogtreecommitdiff
path: root/lib/vquic/quiche.c
diff options
context:
space:
mode:
authorJavier Blazquez <jblazquez@riotgames.com>2019-10-27 15:48:43 -0700
committerDaniel Stenberg <daniel@haxx.se>2019-10-28 09:21:43 +0100
commite0ee3d9f9b6f4ad2165bfbfdef5812ca9d01d924 (patch)
tree23c86d81ee6c6c4792ef8e2cdefdea201169dc2f /lib/vquic/quiche.c
parent0f234a5cdebd455f324cdf64b604b4a1340dbbfe (diff)
HTTP3: fix Windows build
The ngtcp2 QUIC backend was using the MSG_DONTWAIT flag for send/recv in order to perform nonblocking operations. On Windows this flag does not exist. Instead, the socket must be set to nonblocking mode via ioctlsocket. This change sets the nonblocking flag on UDP sockets used for QUIC on all platforms so the use of MSG_DONTWAIT is not needed. Fixes #4531 Closes #4532
Diffstat (limited to 'lib/vquic/quiche.c')
-rw-r--r--lib/vquic/quiche.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vquic/quiche.c b/lib/vquic/quiche.c
index 28eba8bbd..0ee360d07 100644
--- a/lib/vquic/quiche.c
+++ b/lib/vquic/quiche.c
@@ -208,7 +208,7 @@ CURLcode Curl_quic_connect(struct connectdata *conn, curl_socket_t sockfd,
conn->primary_ip, &conn->primary_port)) {
char buffer[STRERROR_LEN];
failf(data, "ssrem inet_ntop() failed with errno %d: %s",
- errno, Curl_strerror(errno, buffer, sizeof(buffer)));
+ SOCKERRNO, Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
return CURLE_BAD_FUNCTION_ARGUMENT;
}
memcpy(conn->ip_addr_str, conn->primary_ip, MAX_IPADR_LEN);
@@ -301,7 +301,7 @@ static CURLcode process_ingress(struct connectdata *conn, int sockfd,
do {
recvd = recv(sockfd, buf, bufsize, 0);
- if((recvd < 0) && ((errno == EAGAIN) || (errno == EWOULDBLOCK)))
+ if((recvd < 0) && ((SOCKERRNO == EAGAIN) || (SOCKERRNO == EWOULDBLOCK)))
break;
if(recvd < 0) {