]> git.sur5r.net Git - openldap/commitdiff
ITS#3524 (partial): reinit FDSETs
authorKurt Zeilenga <kurt@openldap.org>
Fri, 28 Jan 2005 19:03:15 +0000 (19:03 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 28 Jan 2005 19:03:15 +0000 (19:03 +0000)
libraries/libldap/os-ip.c

index dad33ed000da23d5e89af2845a49c8756c719e14..ae5225ca00cccec0054dced619f1f8ffd985b8d8 100644 (file)
@@ -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,