]> git.sur5r.net Git - openldap/commitdiff
cleanup debug messages
authorPierangelo Masarati <ando@openldap.org>
Sun, 29 Aug 2010 01:45:14 +0000 (01:45 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 29 Aug 2010 01:45:14 +0000 (01:45 +0000)
tests/progs/slapd-read.c
tests/progs/slapd-search.c

index 118d0665de61187f4e58130237e29c177390d5a9..fcedeccea531a508213a9fec4a445803b661b6ca 100644 (file)
@@ -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 );
index 6a86c8a53ba27275bb8f6a6d02f67148feaaba36..240c076c64515cfc7c8a513479ba11704c0705d6 100644 (file)
@@ -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 );