From d44ac9835a746d1fbcf5e150a3218df114640372 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 28 May 1999 05:19:18 +0000 Subject: [PATCH] In try_read1msg, clear errno before calling ber_get_next, otherwise leftover values will obscure EOF condition on closed sockets. --- libraries/libldap/result.c | 1 + 1 file changed, 1 insertion(+) 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) { -- 2.39.5