From: Gary Williams Date: Thu, 12 Oct 2000 20:13:20 +0000 (+0000) Subject: example client using new logging X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1768 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fd4b8ba0cd8c1aedb91837d36cfaafac3a64a735;p=openldap example client using new logging --- diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 13a786b248..c4432f67e9 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -165,6 +165,7 @@ main( int argc, char **argv ) { char *infile, *filtpattern, **attrs = NULL, line[BUFSIZ]; FILE *fp = NULL; + FILE *log = NULL; int rc, i, first, scope, deref, attrsonly, manageDSAit; int referrals, timelimit, sizelimit, debug; int authmethod, version, want_bindpw; @@ -174,6 +175,11 @@ main( int argc, char **argv ) debug = verbose = not = vals2tmp = referrals = attrsonly = manageDSAit = ldif = want_bindpw = 0; + lutil_log_initialize(argc, argv); + lutil_set_debug_level( "LIBLBER", 8 ); + /* log = fopen( "ldapsearch.log", "w" ); */ + /* ber_set_option( NULL, LBER_OPT_LOG_PRINT_FILE, log ); */ + deref = sizelimit = timelimit = version = -1; scope = LDAP_SCOPE_SUBTREE; @@ -728,6 +734,7 @@ main( int argc, char **argv ) return EXIT_FAILURE; } + if ( use_tls && ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS ) { if ( use_tls > 1 ) { ldap_perror( ld, "ldap_start_tls" );