From 82f7a0a3bdace6f461f4aaae195b1fb2ef35d1f3 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 18 Aug 2006 17:12:16 +0000 Subject: [PATCH] re-fix ITS#4405 (really start from the first conn) --- libraries/libldap/result.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index 9045dd32fd..1226e19316 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -354,8 +354,7 @@ wait4msg( ldap_pvt_thread_mutex_lock( &ld->ld_conn_mutex ); #endif for ( lc = ld->ld_conns; - rc == LDAP_MSG_X_KEEP_LOOKING && lc != NULL; - lc = lc->lconn_next ) + rc == LDAP_MSG_X_KEEP_LOOKING && lc != NULL; ) { if ( lc->lconn_status == LDAP_CONNST_CONNECTED && ldap_is_read_ready( ld, lc->lconn_sb ) ) @@ -374,8 +373,14 @@ wait4msg( * sane; better restart * (ITS#4405) */ lc = ld->ld_conns; + + /* don't get to next conn! */ + break; } } + + /* next conn */ + lc = lc->lconn_next; } #ifdef LDAP_R_COMPILE ldap_pvt_thread_mutex_unlock( &ld->ld_conn_mutex ); -- 2.39.5