From: Howard Chu Date: Fri, 4 Dec 2009 02:44:00 +0000 (+0000) Subject: ITS#6412, refix #6304 - only check for writes if sockbuf NEEDS_WRITE X-Git-Tag: ACLCHECK_0~33 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7c9e4df7653d1d545e84f0897a4c464314d5d3bf;p=openldap ITS#6412, refix #6304 - only check for writes if sockbuf NEEDS_WRITE --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 7f8331f532..66e49f1c4d 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -1362,8 +1362,8 @@ connection_read( ber_socket_t s, conn_readinfo *cri ) c->c_connid, (int) s, c->c_tls_ssf, c->c_ssf, 0 ); slap_sasl_external( c, c->c_tls_ssf, &authid ); if ( authid.bv_val ) free( authid.bv_val ); - } else if ( rc == 1 ) { /* need to retry */ - slapd_set_read( s, 0 ); + } else if ( rc == 1 && ber_sockbuf_ctrl( c->c_sb, + LBER_SB_OPT_NEEDS_WRITE, NULL )) { /* need to retry */ slapd_set_write( s, 1 ); connection_return( c ); return 0;