diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 4f2a5cec00..eb459637ce 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -107,7 +107,13 @@ static Connection* connection_get( int s ) } } #endif + if( c != NULL ) { + /* we do this BEFORE locking to aid in debugging */ + Debug( LDAP_DEBUG_TRACE, + "connection_get(%d): got connid=%ld\n", + s, c->c_connid, 0 ); + ldap_pvt_thread_mutex_lock( &c->c_mutex ); } return c;