summaryrefslogtreecommitdiffstats
path: root/apps/s_socket.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2016-03-02 22:12:46 +0100
committerRich Salz <rsalz@openssl.org>2016-03-07 20:47:54 +0100
commit8731a4fcd267d56cab2ad6d7cfac2c846c413a5d (patch)
treeb910ec1848c7ab94b633264a3c076c89007ead4e /apps/s_socket.c
parentMinor update to includes and documentation for ct_test.c (diff)
downloadopenssl-8731a4fcd267d56cab2ad6d7cfac2c846c413a5d.tar.xz
openssl-8731a4fcd267d56cab2ad6d7cfac2c846c413a5d.zip
ISSUE 43: Add BIO_sock_shutdown
This replaces SHUTDOWN/SHUTDOWN2 with BIO_closesocket. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps/s_socket.c')
-rw-r--r--apps/s_socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/s_socket.c b/apps/s_socket.c
index 958dd78850..00556bccb0 100644
--- a/apps/s_socket.c
+++ b/apps/s_socket.c
@@ -266,11 +266,11 @@ int do_server(int *accept_sock, const char *host, const char *port,
} while (sock < 0 && BIO_sock_should_retry(ret));
if (sock < 0) {
ERR_print_errors(bio_err);
- SHUTDOWN(asock);
+ BIO_closesocket(asock);
break;
}
i = (*cb)(sock, type, context);
- SHUTDOWN2(sock);
+ BIO_closesocket(sock);
} else {
i = (*cb)(asock, type, context);
}
@@ -278,7 +278,7 @@ int do_server(int *accept_sock, const char *host, const char *port,
if (naccept != -1)
naccept--;
if (i < 0 || naccept == 0) {
- SHUTDOWN2(asock);
+ BIO_closesocket(asock);
ret = i;
break;
}