mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-12 07:13:41 -05:00
ITS#2921, fix client connection handling for HAVE_WINSOCK
This commit is contained in:
parent
a6b1dfd1c8
commit
bb1a97544d
1 changed files with 5 additions and 1 deletions
|
|
@ -321,7 +321,6 @@ static Connection* connection_get( ber_socket_t s )
|
|||
ldap_pvt_thread_mutex_unlock( &c->c_mutex );
|
||||
return NULL;
|
||||
}
|
||||
if( c->c_conn_state == SLAP_C_CLIENT ) sd = 0;
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( CONNECTION, RESULTS,
|
||||
|
|
@ -424,6 +423,10 @@ long connection_init(
|
|||
break;
|
||||
}
|
||||
|
||||
if( connections[i].c_conn_state == SLAP_C_CLIENT ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
assert( connections[i].c_struct_state == SLAP_C_USED );
|
||||
assert( connections[i].c_conn_state != SLAP_C_INVALID );
|
||||
assert( sd != AC_SOCKET_INVALID );
|
||||
|
|
@ -528,6 +531,7 @@ long connection_init(
|
|||
if ( flags == CONN_IS_CLIENT ) {
|
||||
c->c_conn_state = SLAP_C_CLIENT;
|
||||
c->c_struct_state = SLAP_C_USED;
|
||||
ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_SET_FD, &s );
|
||||
ldap_pvt_thread_mutex_unlock( &c->c_mutex );
|
||||
ldap_pvt_thread_mutex_unlock( &connections_mutex );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue