mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
don't use deprecated functions
This commit is contained in:
parent
faa13725e6
commit
d1e00eef03
@ -387,7 +387,8 @@ ldap_int_open_connection(
|
||||
}
|
||||
|
||||
|
||||
int ldap_open_internal_connection( LDAP **ldp, ber_socket_t *fdp )
|
||||
int
|
||||
ldap_open_internal_connection( LDAP **ldp, ber_socket_t *fdp )
|
||||
{
|
||||
int rc;
|
||||
LDAPConn *c;
|
||||
@ -402,7 +403,7 @@ int ldap_open_internal_connection( LDAP **ldp, ber_socket_t *fdp )
|
||||
/* Make it appear that a search request, msgid 0, was sent */
|
||||
lr = (LDAPRequest *)LDAP_CALLOC( 1, sizeof( LDAPRequest ));
|
||||
if( lr == NULL ) {
|
||||
ldap_unbind( *ldp );
|
||||
ldap_unbind_ext( *ldp, NULL, NULL );
|
||||
*ldp = NULL;
|
||||
return( LDAP_NO_MEMORY );
|
||||
}
|
||||
@ -416,7 +417,7 @@ int ldap_open_internal_connection( LDAP **ldp, ber_socket_t *fdp )
|
||||
/* Attach the passed socket as the *LDAP's connection */
|
||||
c = ldap_new_connection( *ldp, NULL, 1, 0, NULL);
|
||||
if( c == NULL ) {
|
||||
ldap_unbind( *ldp );
|
||||
ldap_unbind_ext( *ldp, NULL, NULL );
|
||||
*ldp = NULL;
|
||||
return( LDAP_NO_MEMORY );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user