]> git.sur5r.net Git - openldap/commitdiff
Revert/Fix prev commit
authorHoward Chu <hyc@openldap.org>
Sat, 18 Oct 2003 12:59:55 +0000 (12:59 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 18 Oct 2003 12:59:55 +0000 (12:59 +0000)
clients/tools/ldapsearch.c

index 1da32c7d85435b493128f6c7df601b0afd94fe4c..6a33da58aed44c32c0bc62a3447242c97fdfb811 100644 (file)
@@ -1131,6 +1131,18 @@ print_entry(
        }
        write_ldif( LDIF_PUT_VALUE, "dn", bv.bv_val, bv.bv_len );
 
+       rc = ldap_get_entry_controls( ld, entry, &ctrls );
+       if( rc != LDAP_SUCCESS ) {
+               fprintf(stderr, _("print_entry: %d\n"), rc );
+               ldap_perror( ld, "ldap_get_entry_controls" );
+               exit( EXIT_FAILURE );
+       }
+
+       if( ctrls ) {
+               print_ctrls( ctrls );
+               ldap_controls_free( ctrls );
+       }
+
        if ( includeufn ) {
                if( ufn == NULL ) {
                        ufn = ldap_dn2ufn( bv.bv_val );
@@ -1199,17 +1211,6 @@ print_entry(
                        ber_memfree( bvals );
                }
        }
-       rc = ldap_pvt_get_controls( ber, &ctrls );
-       if( rc != LDAP_SUCCESS ) {
-               fprintf(stderr, _("print_entry: %d\n"), rc );
-               ldap_perror( ld, "ldap_pvt_get_controls" );
-               exit( EXIT_FAILURE );
-       }
-
-       if( ctrls ) {
-               print_ctrls( ctrls );
-               ldap_controls_free( ctrls );
-       }
 
        if( ber != NULL ) {
                ber_free( ber, 0 );