From: Pierangelo Masarati Date: Sun, 29 Aug 2010 01:45:14 +0000 (+0000) Subject: cleanup debug messages X-Git-Tag: MIGRATION_CVS2GIT~510 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7aeb00b49424fb31ca25413a81989df2de32c1e8;p=openldap cleanup debug messages --- diff --git a/tests/progs/slapd-read.c b/tests/progs/slapd-read.c index 118d0665de..fcedeccea5 100644 --- a/tests/progs/slapd-read.c +++ b/tests/progs/slapd-read.c @@ -329,7 +329,7 @@ do_random( char *uri, char *manager, struct berval *passwd, break; } - fprintf( stderr, " PID=%ld - Search done (%d).\n", (long) pid, rc ); + fprintf( stderr, " PID=%ld - Read done (%d).\n", (long) pid, rc ); if ( ld != NULL ) { ldap_unbind_ext( ld, NULL, NULL ); @@ -407,10 +407,10 @@ retry:; active++; #if 0 fprintf( stderr, - ">>> PID=%ld - Search(%d, %d, %d, %d): " - "base=\"%s\" scope=%s filter=\"%s\"\n", + ">>> PID=%ld - Read maxloop=%d cnt=%d active=%d msgid=%d: " + "entry=\"%s\"\n", (long) pid, maxloop, i, active, msgids[i], - entry, ldap_pvt_scope2str( scope ), filter ); + entry ); #endif i++; @@ -447,6 +447,12 @@ retry:; switch ( rc ) { case -1: /* gone really bad */ +#if 0 + fprintf( stderr, + ">>> PID=%ld - Read maxloop=%d cnt=%d active=%d: " + "entry=\"%s\" ldap_result()=%d\n", + (long) pid, maxloop, i, active, entry, rc ); +#endif goto cleanup; case 0: @@ -461,6 +467,8 @@ retry:; case LDAP_RES_SEARCH_RESULT: /* just remove, no error checking (TODO?) */ msgid = ldap_msgid( res ); + ldap_parse_result( ld, res, &rc, NULL, NULL, NULL, NULL, 1 ); + res = NULL; /* linear search, bah */ for ( j = 0; j < i; j++ ) { @@ -469,7 +477,7 @@ retry:; active--; #if 0 fprintf( stderr, - "<<< PID=%ld - SearchDone(%d, %d, %d, %d): " + "<<< PID=%ld - ReadDone maxloop=%d cnt=%d active=%d msgid=%d: " "entry=\"%s\"\n", (long) pid, maxloop, j, active, msgid, entry ); #endif @@ -481,7 +489,7 @@ retry:; default: /* other messages unexpected */ fprintf( stderr, - "### PID=%ld - Search(%d): " + "### PID=%ld - Read(%d): " "entry=\"%s\" attrs=%s%s. unexpected response tag=%d\n", (long) pid, maxloop, entry, attrs[0], attrs[1] ? " (more...)" : "", rc ); diff --git a/tests/progs/slapd-search.c b/tests/progs/slapd-search.c index 6a86c8a53b..240c076c64 100644 --- a/tests/progs/slapd-search.c +++ b/tests/progs/slapd-search.c @@ -461,7 +461,7 @@ retry:; active++; #if 0 fprintf( stderr, - ">>> PID=%ld - Search(%d, %d, %d, %d): " + ">>> PID=%ld - Search maxloop=%d cnt=%d active=%d msgid=%d: " "base=\"%s\" scope=%s filter=\"%s\"\n", (long) pid, innerloop, i, active, msgids[i], sbase, ldap_pvt_scope2str( scope ), filter ); @@ -526,7 +526,7 @@ retry:; active--; #if 0 fprintf( stderr, - "<<< PID=%ld - SearchDone(%d, %d, %d, %d): " + "<<< PID=%ld - SearchDone maxloop=%d cnt=%d active=%d msgid=%d: " "base=\"%s\" scope=%s filter=\"%s\"\n", (long) pid, innerloop, j, active, msgid, sbase, ldap_pvt_scope2str( scope ), filter );