In try_read1msg, clear errno before calling ber_get_next, otherwise leftover

values will obscure EOF condition on closed sockets.
This commit is contained in:
Howard Chu 1999-05-28 05:19:18 +00:00
parent 6e0c7b95ab
commit d44ac9835a

View File

@ -268,6 +268,7 @@ try_read1msg( LDAP *ld, int msgid, int all, Sockbuf *sb,
#endif
/* get the next message */
errno = 0;
if ( (tag = ber_get_next( sb, &len, ber ))
!= LDAP_TAG_MESSAGE ) {
if ( tag == LBER_DEFAULT) {