]> git.sur5r.net Git - openldap/commitdiff
Fix ITS#1865, (ITS#1764?) cond_broadcast behavior was broken
authorHoward Chu <hyc@openldap.org>
Fri, 7 Jun 2002 22:45:22 +0000 (22:45 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 7 Jun 2002 22:45:22 +0000 (22:45 +0000)
libraries/libldap_r/thr_nt.c

index 6ebb0ccce8b42a2fbbdd3ad41dd900aea854c50b..b818538a859f0048cbc076420a0c825b26082560 100644 (file)
@@ -109,7 +109,8 @@ ldap_pvt_thread_cond_wait( ldap_pvt_thread_cond_t *cond,
 int
 ldap_pvt_thread_cond_broadcast( ldap_pvt_thread_cond_t *cond )
 {
-       SetEvent( *cond );
+       while ( WaitForSingleObject( *cond, 0 ) == WAIT_TIMEOUT )
+               SetEvent( *cond );
        return( 0 );
 }