From a583d1a9e514bc26f52abef59183b52d66910624 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 17 Aug 2005 16:19:58 +0000 Subject: [PATCH] fix testers (tnx to Luca) --- tests/progs/slapd-search.c | 8 ++++---- tests/progs/slapd-tester.c | 12 +++++++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/progs/slapd-search.c b/tests/progs/slapd-search.c index 25488b816c..7158831056 100644 --- a/tests/progs/slapd-search.c +++ b/tests/progs/slapd-search.c @@ -161,8 +161,8 @@ retry:; switch ( rc ) { case LDAP_BUSY: case LDAP_UNAVAILABLE: - if ( do_retry == 1 ) { - do_retry = 0; + if ( do_retry > 0 ) { + do_retry--; sleep( 1 ); goto retry; } @@ -180,8 +180,8 @@ retry:; filter, attrs, 0, &res ); if ( rc != LDAP_SUCCESS ) { ldap_perror( ld, "ldap_search" ); - if ( rc == LDAP_BUSY && do_retry == 1 ) { - do_retry = 0; + if ( rc == LDAP_BUSY && do_retry > 0 ) { + do_retry--; goto retry; } if ( rc != LDAP_NO_SUCH_OBJECT ) break; diff --git a/tests/progs/slapd-tester.c b/tests/progs/slapd-tester.c index 7d14de72c6..4121b4d174 100644 --- a/tests/progs/slapd-tester.c +++ b/tests/progs/slapd-tester.c @@ -71,7 +71,17 @@ static char argbuf[BUFSIZ]; static void usage( char *name ) { - fprintf( stderr, "usage: %s -H | ([-h ] -p ) -D -w -d [-j ] [-l ] -P \n", name ); + fprintf( stderr, + "usage: %s " + "-H | ([-h ] -p ) " + "-D " + "-w " + "-d " + "[-j ] " + "[-l ] " + "-P " + "[-r ]\n", + name ); exit( EXIT_FAILURE ); } -- 2.39.5