]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/test.c
rename ldap_pvt_init_utils() to ldap_int_utils_init() and provide
[openldap] / libraries / libldap / test.c
index 23088a116620cb41626733ebcf55085a7bc48a1b..c36bb26877457884694db59b4af5027016f4bd39 100644 (file)
@@ -226,7 +226,6 @@ get_modlist( char *prompt1, char *prompt2, char *prompt3 )
 }
 
 
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
 static int
 bind_prompt( LDAP *ld, char **dnp, char **passwdp, int *authmethodp,
        int freeit )
@@ -261,7 +260,6 @@ bind_prompt( LDAP *ld, char **dnp, char **passwdp, int *authmethodp,
 
        return( LDAP_SUCCESS );
 }
-#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
 
 
 int
@@ -545,12 +543,10 @@ main( int argc, char **argv )
                        if ( cldapflg )
                                cldap_close( ld );
 #endif /* LDAP_CONNECTIONLESS */
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
-                       if ( !cldapflg )
-#else /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
-                       if ( !cldapflg && bound )
-#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
+
+                       if ( !cldapflg ) {
                                ldap_unbind( ld );
+                       }
                        exit( 0 );
                        break;
 
@@ -792,7 +788,6 @@ main( int argc, char **argv )
                        }
 #endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_DNS */
 
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
                        getline( line, sizeof(line), stdin,
                                "Recognize and chase referrals (0=no, 1=yes)?" );
                        if ( atoi( line ) != 0 ) {
@@ -803,7 +798,6 @@ main( int argc, char **argv )
                                        ldap_set_rebind_proc( ld, bind_prompt );
                                }
                        }
-#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
                        break;
 
                case 'O':       /* set cache options */
@@ -906,7 +900,7 @@ print_ldap_result( LDAP *ld, LDAPMessage *lm, char *s )
 /*
        if ( ld->ld_error != NULL && *ld->ld_error != '\0' )
                fprintf( stderr, "Additional info: %s\n", ld->ld_error );
-       if ( NAME_ERROR( ld->ld_errno ) && ld->ld_matched != NULL )
+       if ( LDAP_NAME_ERROR( ld->ld_errno ) && ld->ld_matched != NULL )
                fprintf( stderr, "Matched DN: %s\n", ld->ld_matched );
 */
 }