From 0e920e9d2980ea44616b5ccdb71d57eecbd33ccd Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 31 Aug 2000 20:53:12 +0000 Subject: [PATCH] Back out last change --- clients/tools/ldapsearch.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 9b349da6b0..dd2712bdcd 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -725,13 +725,9 @@ main( int argc, char **argv ) return EXIT_FAILURE; } - if ( use_tls ) { - rc = ldap_start_tls_s( ld, NULL, NULL ); - - if ( rc != LDAP_SUCCESS && use_tls > 1 ) { + if ( use_tls && ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS ) { + if ( use_tls > 1 ) { ldap_perror( ld, "ldap_start_tls" ); - fprintf( stderr, "Could not start TLS %d: %s\n", - rc, ldap_err2string( rc ) ); return EXIT_FAILURE; } fprintf( stderr, "WARNING: could not start TLS\n" ); -- 2.39.5