summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/bss_acpt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bio/bss_acpt.c')
-rw-r--r--src/lib/libcrypto/bio/bss_acpt.c18
1 files changed, 15 insertions, 3 deletions
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 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#ifndef NO_SOCK 59#ifndef OPENSSL_NO_SOCK
60 60
61#include <stdio.h> 61#include <stdio.h>
62#include <errno.h> 62#include <errno.h>
@@ -64,13 +64,13 @@
64#include "cryptlib.h" 64#include "cryptlib.h"
65#include <openssl/bio.h> 65#include <openssl/bio.h>
66 66
67#ifdef WIN16 67#ifdef OPENSSL_SYS_WIN16
68#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */ 68#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
69#else 69#else
70#define SOCKET_PROTOCOL IPPROTO_TCP 70#define SOCKET_PROTOCOL IPPROTO_TCP
71#endif 71#endif
72 72
73#if (defined(VMS) && __VMS_VER < 70000000) 73#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
74/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */ 74/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
75#undef FIONBIO 75#undef FIONBIO
76#endif 76#endif
@@ -236,8 +236,20 @@ again:
236 c->state=ACPT_S_OK; 236 c->state=ACPT_S_OK;
237 goto again; 237 goto again;
238 } 238 }
239 BIO_clear_retry_flags(b);
240 b->retry_reason=0;
239 i=BIO_accept(c->accept_sock,&(c->addr)); 241 i=BIO_accept(c->accept_sock,&(c->addr));
242
243 /* -2 return means we should retry */
244 if(i == -2)
245 {
246 BIO_set_retry_special(b);
247 b->retry_reason=BIO_RR_ACCEPT;
248 return -1;
249 }
250
240 if (i < 0) return(i); 251 if (i < 0) return(i);
252
241 bio=BIO_new_socket(i,BIO_CLOSE); 253 bio=BIO_new_socket(i,BIO_CLOSE);
242 if (bio == NULL) goto err; 254 if (bio == NULL) goto err;
243 255