X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fbio%2Fbss_sock.c;h=c1f76a24a799533fcb5711a5b1245466b25ac6ae;hp=5a73e81315db3e69b998d21094ee99c7cd73597e;hb=b7b8e948014d93e1eb6d954d0799ae68ab0e068b;hpb=4d428cd2504c7ef03bc9672ecf2862eaedb3d87e diff --git a/crypto/bio/bss_sock.c b/crypto/bio/bss_sock.c index 5a73e81315..c1f76a24a7 100644 --- a/crypto/bio/bss_sock.c +++ b/crypto/bio/bss_sock.c @@ -1,4 +1,3 @@ -/* crypto/bio/bss_sock.c */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -59,7 +58,8 @@ #include #include #define USE_SOCKETS -#include "cryptlib.h" +#include "bio_lcl.h" +#include "internal/cryptlib.h" #ifndef OPENSSL_NO_SOCK @@ -79,7 +79,7 @@ static int sock_new(BIO *h); static int sock_free(BIO *data); int BIO_sock_should_retry(int s); -static BIO_METHOD methods_sockp = { +static const BIO_METHOD methods_sockp = { BIO_TYPE_SOCKET, "socket", sock_write, @@ -92,7 +92,7 @@ static BIO_METHOD methods_sockp = { NULL, }; -BIO_METHOD *BIO_s_socket(void) +const BIO_METHOD *BIO_s_socket(void) { return (&methods_sockp); } @@ -123,7 +123,7 @@ static int sock_free(BIO *a) return (0); if (a->shutdown) { if (a->init) { - SHUTDOWN2(a->num); + BIO_closesocket(a->num); } a->init = 0; a->flags = 0; @@ -215,12 +215,6 @@ int BIO_sock_should_retry(int i) if ((i == 0) || (i == -1)) { err = get_last_socket_error(); -# if defined(OPENSSL_SYS_WINDOWS) && 0/* more microsoft stupidity? perhaps - * not? Ben 4/1/99 */ - if ((i == -1) && (err == 0)) - return (1); -# endif - return (BIO_sock_non_fatal_error(err)); } return (0); @@ -229,7 +223,7 @@ int BIO_sock_should_retry(int i) int BIO_sock_non_fatal_error(int err) { switch (err) { -# if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE) +# if defined(OPENSSL_SYS_WINDOWS) # if defined(WSAEWOULDBLOCK) case WSAEWOULDBLOCK: # endif