From: Howard Chu Date: Sat, 26 Jan 2002 13:43:22 +0000 (+0000) Subject: Fix, errno was incorrect after SSL_read returned 0 bytes, caused slapd to X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~19 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c81d2bb85549520003d2e73f4f8f8742d63dfbdb;p=openldap Fix, errno was incorrect after SSL_read returned 0 bytes, caused slapd to close the connection prematurely. --- diff --git a/libraries/libldap/tls.c b/libraries/libldap/tls.c index 3c409404db..aaf1844562 100644 --- a/libraries/libldap/tls.c +++ b/libraries/libldap/tls.c @@ -433,9 +433,7 @@ sb_tls_read( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len) err = SSL_get_error( p->ssl, ret ); if (err == SSL_ERROR_WANT_READ ) { sbiod->sbiod_sb->sb_trans_needs_read = 1; -#ifdef WIN32 errno = EWOULDBLOCK; -#endif } else sbiod->sbiod_sb->sb_trans_needs_read = 0; @@ -461,9 +459,7 @@ sb_tls_write( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len) err = SSL_get_error( p->ssl, ret ); if (err == SSL_ERROR_WANT_WRITE ) { sbiod->sbiod_sb->sb_trans_needs_write = 1; -#ifdef WIN32 errno = EWOULDBLOCK; -#endif } else sbiod->sbiod_sb->sb_trans_needs_write = 0;