From b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9 Mon Sep 17 00:00:00 2001 From: beck <> Date: Wed, 15 May 2002 02:29:21 +0000 Subject: OpenSSL 0.9.7 stable 2002 05 08 merge --- src/lib/libcrypto/bio/bss_acpt.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/lib/libcrypto/bio/bss_acpt.c') diff --git a/src/lib/libcrypto/bio/bss_acpt.c b/src/lib/libcrypto/bio/bss_acpt.c index 4da5822062..8ea1db158b 100644 --- a/src/lib/libcrypto/bio/bss_acpt.c +++ b/src/lib/libcrypto/bio/bss_acpt.c @@ -56,7 +56,7 @@ * [including the GNU Public Licence.] */ -#ifndef NO_SOCK +#ifndef OPENSSL_NO_SOCK #include #include @@ -64,13 +64,13 @@ #include "cryptlib.h" #include -#ifdef WIN16 +#ifdef OPENSSL_SYS_WIN16 #define SOCKET_PROTOCOL 0 /* more microsoft stupidity */ #else #define SOCKET_PROTOCOL IPPROTO_TCP #endif -#if (defined(VMS) && __VMS_VER < 70000000) +#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000) /* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */ #undef FIONBIO #endif @@ -236,8 +236,20 @@ again: c->state=ACPT_S_OK; goto again; } + BIO_clear_retry_flags(b); + b->retry_reason=0; i=BIO_accept(c->accept_sock,&(c->addr)); + + /* -2 return means we should retry */ + if(i == -2) + { + BIO_set_retry_special(b); + b->retry_reason=BIO_RR_ACCEPT; + return -1; + } + if (i < 0) return(i); + bio=BIO_new_socket(i,BIO_CLOSE); if (bio == NULL) goto err; -- cgit v1.2.3-55-g6feb