From: Pierangelo Masarati Date: Tue, 4 Apr 2006 17:41:13 +0000 (+0000) Subject: only wait if no entry was returned X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~25 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2e9f2995ec43eee34203f6e32db1b9ae03a35d98;p=openldap only wait if no entry was returned --- diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 32e2b27fc9..ae6da9dc58 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -474,7 +474,10 @@ really_bad:; } op->o_private = savepriv; + /* don't wait any longer... */ gotit = 1; + tv.tv_sec = 0; + tv.tv_usec = 0; #if 0 /* @@ -753,13 +756,11 @@ really_bad:; } } + /* if no entry was found during this loop, + * set a minimal timeout */ if ( gotit == 0 ) { LDAP_BACK_TV_SET( &tv ); ldap_pvt_thread_yield(); - - } else { - tv.tv_sec = 0; - tv.tv_usec = 0; } }