From: Pierangelo Masarati Date: Thu, 15 Dec 2005 19:12:09 +0000 (+0000) Subject: log attrs X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~589 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3edbd4fee7c814a690ff5d386f9ed2a9ff8614ab;p=openldap log attrs --- diff --git a/libraries/libldap/search.c b/libraries/libldap/search.c index 60cac86f30..57647d92f1 100644 --- a/libraries/libldap/search.c +++ b/libraries/libldap/search.c @@ -298,6 +298,23 @@ ldap_build_search_req( return( NULL ); } +#ifdef LDAP_DEBUG + if ( ldap_debug & LDAP_DEBUG_ARGS ) { + if ( attrs == NULL ) { + Debug( LDAP_DEBUG_ARGS, "ldap_build_search_req ATTRS: *\n", 0, 0, 0 ); + + } else { + int i; + + Debug( LDAP_DEBUG_ARGS, "ldap_build_search_req ATTRS:\n", 0, 0, 0 ); + + for ( i = 0; attrs[ i ]; i++ ) { + Debug( LDAP_DEBUG_ARGS, " %s\n", attrs[ i ], 0, 0 ); + } + } + } +#endif /* LDAP_DEBUG */ + if ( ber_printf( ber, /*{*/ "{v}N}", attrs ) == -1 ) { ld->ld_errno = LDAP_ENCODING_ERROR; ber_free( ber, 1 );