From: Julio Sánchez Fernández Date: Fri, 16 Jul 1999 15:46:15 +0000 (+0000) Subject: We were not remembering the allocated SSL thing in the Sockbuf. X-Git-Tag: OPENLDAP_REL_ENG_2_BP~114 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=85acec922f05338ad3f1a5b1d025f5eafe72ba3a;p=openldap We were not remembering the allocated SSL thing in the Sockbuf. Set flags without relying on errno (this change may be gratuitous or wrong). --- diff --git a/libraries/libldap/tls.c b/libraries/libldap/tls.c index d92784e000..5ee0d0cf6a 100644 --- a/libraries/libldap/tls.c +++ b/libraries/libldap/tls.c @@ -211,6 +211,7 @@ alloc_handle( Sockbuf *sb, void *ctx_arg ) return NULL; } + sb->sb_iodata = ssl; SSL_set_fd( ssl, ber_pvt_sb_get_desc( sb ) ); return ssl; } @@ -296,14 +297,7 @@ ldap_pvt_tls_accept( Sockbuf *sb, void *ctx_arg ) err = SSL_accept( ssl ); if ( err <= 0 ) { - if ( -#ifdef EWOULDBLOCK - (errno==EWOULDBLOCK) || -#endif -#ifdef EAGAIN - (errno==EAGAIN) || -#endif - (0)) { + if ( !SSL_want_nothing( ssl ) ) { update_flags( sb, ssl ); return 1; }