commit 9af4a482e857fd14b10a1bc52e71d971d9f081a7
parent beae0da3aedd2c8eb40aef3882f8b34de22b17b6
Author: ng0 <ng0@n0.is>
Date: Mon, 24 Jun 2019 11:27:24 +0000
mhd_send.c: Try to guess the right branch to close.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
@@ -284,7 +284,7 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
#if HAVE_WRITEV
MHD_socket s = connection->socket_fd;
bool have_cork, have_more;
- int iovcnt, optval;
+ int iovcnt, optval, eno;
struct iovec vector[2];
have_cork = ! connection->sk_tcp_nodelay_on;
@@ -322,7 +322,7 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
ret = writev (connection->socket_fd, vector, iovcnt);
#if TCP_CORK
{
- int eno;
+ eno;
eno = errno;
if ((ret == header_len + buffer_len) && have_cork)
@@ -338,6 +338,7 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
errno = eno;
}
return ret;
+#endif
#else
return MHD_send_on_connection_ (connection,
header,