From: Howard Chu Date: Fri, 28 May 1999 05:19:18 +0000 (+0000) Subject: In try_read1msg, clear errno before calling ber_get_next, otherwise leftover X-Git-Tag: OPENLDAP_REL_ENG_2_BP~497 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d44ac9835a746d1fbcf5e150a3218df114640372;p=openldap In try_read1msg, clear errno before calling ber_get_next, otherwise leftover values will obscure EOF condition on closed sockets. --- diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index 11d5e594f3..90e9e69b65 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -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) {