From 3edbd4fee7c814a690ff5d386f9ed2a9ff8614ab Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 15 Dec 2005 19:12:09 +0000 Subject: [PATCH] log attrs --- libraries/libldap/search.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 ); -- 2.39.5