]> git.sur5r.net Git - openldap/commitdiff
Fix, errno was incorrect after SSL_read returned 0 bytes, caused slapd to
authorHoward Chu <hyc@openldap.org>
Sat, 26 Jan 2002 13:43:22 +0000 (13:43 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 26 Jan 2002 13:43:22 +0000 (13:43 +0000)
close the connection prematurely.

libraries/libldap/tls.c

index 3c409404db004c0f0317faee1b5032c967bf7bca..aaf1844562e3a6286c65081538f4360d1035114a 100644 (file)
@@ -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;