From: Howard Chu Date: Sat, 24 Jul 2004 03:13:29 +0000 (+0000) Subject: ITS#3250 don't call select unnecessarily X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~30 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0b9cc398e23add36c894abbe22a17a627bde0c16;p=openldap ITS#3250 don't call select unnecessarily --- diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index dbf75ee140..03356c5cef 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -314,6 +314,7 @@ wait4msg( if( (*result = chkResponseList(ld, msgid, all)) != NULL ) { rc = (*result)->lm_msgtype; } else { + int lc_ready = 0; for ( lc = ld->ld_conns; lc != NULL; lc = nextlc ) { nextlc = lc->lconn_next; @@ -321,11 +322,12 @@ wait4msg( LBER_SB_OPT_DATA_READY, NULL ) ) { rc = try_read1msg( ld, msgid, all, lc->lconn_sb, &lc, result ); + lc_ready = 1; break; } } - if ( lc == NULL ) { + if ( !lc_ready ) { rc = ldap_int_select( ld, tvp ); #ifdef LDAP_DEBUG if ( rc == -1 ) {