From: Gary Williams Date: Tue, 11 May 1999 13:42:57 +0000 (+0000) Subject: use mutex to protect connection in connection_destroy until task is complete X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~65 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e72b5e5c61aec03c46711358a31e41adf38f8403;p=openldap use mutex to protect connection in connection_destroy until task is complete --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 322c44d597..b7ed2d7d62 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -322,6 +322,7 @@ connection_destroy( Connection *c ) assert( c->c_conn_state != SLAP_C_INVALID ); assert( c->c_ops == NULL ); + ldap_pvt_thread_mutex_lock( &connections_mutex ); c->c_struct_state = SLAP_C_UNUSED; c->c_conn_state = SLAP_C_INVALID; @@ -359,6 +360,7 @@ connection_destroy( Connection *c ) } lber_pvt_sb_destroy( &c->c_sb ); + ldap_pvt_thread_mutex_unlock( &connections_mutex ); } int connection_state_closing( Connection *c )