From: Kurt Zeilenga Date: Thu, 27 May 1999 02:29:18 +0000 (+0000) Subject: Add comment concerning connections mutex. Need to analysis X-Git-Tag: OPENLDAP_REL_ENG_2_BP~512 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1ee8cc51a8a085f5d08e4702cea31c61e002b46e;p=openldap Add comment concerning connections mutex. Need to analysis locking requires and possibly restructure locking. --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index e065530137..4d8d339e6e 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -318,6 +318,8 @@ long connection_init( static void connection_destroy( Connection *c ) { + /* note: connections_mutex should be locked by caller */ + assert( connections != NULL ); assert( c != NULL ); assert( c->c_struct_state != SLAP_C_UNUSED ); @@ -429,6 +431,8 @@ static void connection_close( Connection *c ) assert( c->c_struct_state == SLAP_C_USED ); assert( c->c_conn_state == SLAP_C_CLOSING ); + /* note: connections_mutex should be locked by caller */ + if( c->c_ops != NULL ) { Debug( LDAP_DEBUG_TRACE, "connection_close: deferring conn=%ld sd=%d.\n",