From: Pierangelo Masarati Date: Thu, 14 Dec 2006 19:22:00 +0000 (+0000) Subject: protect assertion behind mutex (test should be atomic anyway...) X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~376 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d29d83a80ea1081ea0c6b638ff7a1fe40f07815a;p=thirdparty%2Fopenldap.git protect assertion behind mutex (test should be atomic anyway...) --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 7a46410ab5..4534075be1 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -303,10 +303,10 @@ static Connection* connection_get( ber_socket_t s ) if( c != NULL ) { ber_socket_t sd; - assert( c->c_struct_state != SLAP_C_UNINITIALIZED ); - ldap_pvt_thread_mutex_lock( &c->c_mutex ); + assert( c->c_struct_state != SLAP_C_UNINITIALIZED ); + ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_GET_FD, &sd ); if( c->c_struct_state != SLAP_C_USED ) { /* connection must have been closed due to resched */