- /* fill it in */
- if ( ber_printf( ber, "{it{ists}}", ++ld->ld_msgid, LDAP_REQ_BIND,
- ld->ld_version, dn, LDAP_AUTH_SIMPLE, passwd ) == -1 ) {
- ld->ld_errno = LDAP_ENCODING_ERROR;
- ber_free( ber, 1 );
- return( -1 );
- }
-
-#ifndef LDAP_NOCACHE
- if ( ld->ld_cache != NULL ) {
- ldap_flush_cache( ld );
- }
-#endif /* !LDAP_NOCACHE */
-
- /* send the message */
- return( ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber ));