]> git.sur5r.net Git - openldap/commitdiff
Fail if ldap_set_option fails
authorKurt Zeilenga <kurt@openldap.org>
Sun, 25 Jun 2000 18:17:47 +0000 (18:17 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 25 Jun 2000 18:17:47 +0000 (18:17 +0000)
clients/tools/ldapmodify.c
clients/tools/ldapmodrdn.c
clients/tools/ldappasswd.c

index f6f71033cd3467c85d1de28d81f5aff1ad82a72c..6bc5c5354a04bf919b2e3844f03d55b2a54d1a7d 100644 (file)
@@ -376,6 +376,7 @@ main( int argc, char **argv )
        {
                fprintf( stderr, "Could not set LDAP_OPT_PROTOCOL_VERSION %d\n",
                        version );
+               return EXIT_FAILURE;
        }
 
        if ( use_tls && ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS ) {
index 1927cbd850162cc99f355efbd570c1579f4d1126..bf490744991cf7397d56989054b22298c859a419 100644 (file)
@@ -365,6 +365,7 @@ main(int argc, char **argv)
        {
                fprintf( stderr, "Could not set LDAP_OPT_PROTOCOL_VERSION %d\n",
                        version );
+               return EXIT_FAILURE;
        }
 
        if ( use_tls && ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS ) {
index 1a8c8984e263fc602b9ee585212b8aa0a0147db0..ad084ae8cf6f910525cf5a8083bd83da2cd8df9f 100644 (file)
@@ -326,6 +326,7 @@ main( int argc, char *argv[] )
 
        if(rc != LDAP_OPT_SUCCESS ) {
                fprintf( stderr, "Could not set LDAP_OPT_PROTOCOL_VERSION %d\n", version );
+               return EXIT_FAILURE;
        }
 
        if ( use_tls && ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS ) {