]> git.sur5r.net Git - openldap/commitdiff
fix testers (tnx to Luca)
authorPierangelo Masarati <ando@openldap.org>
Wed, 17 Aug 2005 16:19:58 +0000 (16:19 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 17 Aug 2005 16:19:58 +0000 (16:19 +0000)
tests/progs/slapd-search.c
tests/progs/slapd-tester.c

index 25488b816c3389d4bf12d1fae98c70fb62503afd..71588310565c47fd78f7d627fbb05aba0a1022de 100644 (file)
@@ -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;
index 7d14de72c6f7eab833bffa36eff9b66e2d569a72..4121b4d17454a45d3be0998025618622eda084f1 100644 (file)
@@ -71,7 +71,17 @@ static char argbuf[BUFSIZ];
 static void
 usage( char *name )
 {
-       fprintf( stderr, "usage: %s -H <uri> | ([-h <host>] -p <port>) -D <manager> -w <passwd> -d <datadir> [-j <maxchild>] [-l <loops>] -P <progdir>\n", name );
+       fprintf( stderr,
+               "usage: %s "
+               "-H <uri> | ([-h <host>] -p <port>) "
+               "-D <manager> "
+               "-w <passwd> "
+               "-d <datadir> "
+               "[-j <maxchild>] "
+               "[-l <loops>] "
+               "-P <progdir> "
+               "[-r <maxretries>]\n",
+               name );
        exit( EXIT_FAILURE );
 }