From 2e9f2995ec43eee34203f6e32db1b9ae03a35d98 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 4 Apr 2006 17:41:13 +0000 Subject: [PATCH] only wait if no entry was returned --- servers/slapd/back-meta/search.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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; } } -- 2.39.5