diff --git a/httpd/axhttpd.c b/httpd/axhttpd.c index bb54e487c..d4b1f4926 100644 --- a/httpd/axhttpd.c +++ b/httpd/axhttpd.c @@ -34,7 +34,10 @@ #include #include #include + +#if !defined(WIN32) #include +#endif #include "axhttp.h" struct serverstruct *servers; @@ -614,7 +617,9 @@ void removeconnection(struct connstruct *cn) cn->ssl = NULL; } +#ifndef WIN32 shutdown(cn->networkdesc, SHUT_WR); +#endif SOCKET_CLOSE(cn->networkdesc); } diff --git a/ssl/tls1.c b/ssl/tls1.c index c332ff81f..d8bcf239e 100755 --- a/ssl/tls1.c +++ b/ssl/tls1.c @@ -946,7 +946,7 @@ static int send_raw_packet(SSL *ssl, uint8_t protocol) while (sent < pkt_size) { ret = SOCKET_WRITE(ssl->client_fd, - &ssl->bm_all_data[sent], pkt_size); + &ssl->bm_all_data[sent], pkt_size-sent); if (ret >= 0) sent += ret;