mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
increment lconn_refcnt so connection does not get closed (ITS#6788)
This commit is contained in:
parent
d829953dd0
commit
6d8e0d5b3e
@ -447,6 +447,11 @@ ldap_int_open_connection(
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* ldap_open_internal_connection - open connection and set file descriptor
|
||||
*
|
||||
* note: ldap_init_fd() may be preferable
|
||||
*/
|
||||
|
||||
int
|
||||
ldap_open_internal_connection( LDAP **ldp, ber_socket_t *fdp )
|
||||
@ -504,6 +509,8 @@ ldap_open_internal_connection( LDAP **ldp, ber_socket_t *fdp )
|
||||
ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &rc );
|
||||
*ldp = ld;
|
||||
|
||||
++ld->ld_defconn->lconn_refcnt; /* so it never gets closed/freed */
|
||||
|
||||
return( LDAP_SUCCESS );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user