From 96854698cde74c24b694e255e9adbc58f53ea39f Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 28 Jan 2005 19:03:15 +0000 Subject: [PATCH] ITS#3524 (partial): reinit FDSETs --- libraries/libldap/os-ip.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index dad33ed000..ae5225ca00 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -291,15 +291,16 @@ ldap_pvt_connect(LDAP *ld, ber_socket_t s, return rc; } #endif - FD_ZERO(&wfds); - FD_SET(s, &wfds ); + + do { + FD_ZERO(&wfds); + FD_SET(s, &wfds ); #ifdef HAVE_WINSOCK - FD_ZERO(&efds); - FD_SET(s, &efds ); + FD_ZERO(&efds); + FD_SET(s, &efds ); #endif - do { rc = select(ldap_int_tblsize, z, &wfds, #ifdef HAVE_WINSOCK &efds, -- 2.39.5