}
/*
- * caller must hold ld_req_mutex
- * if ( connect != 0 ) or ( bind != NULL ) caller must also hold ld_res_mutex
+ * caller must hold ld_req_mutex or be exclusive user of ld
+ * if ( connect != 0 ) or ( bind != NULL ) caller must also hold
+ * ld_req_mutex and ld_res_mutex
*/
LDAPConn *
LDAPConn *lc;
int async = 0;
-#ifdef LDAP_R_COMPILE
- LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER( &ld->ld_req_mutex );
-#endif
-
Debug( LDAP_DEBUG_TRACE, "ldap_new_connection %d %d %d\n",
use_ldsb, connect, (bind != NULL) );
/*
if ( connect ) {
#ifdef LDAP_R_COMPILE
+ LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER( &ld->ld_req_mutex );
LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER( &ld->ld_res_mutex );
#endif
LDAPConn *savedefconn;
#ifdef LDAP_R_COMPILE
+ LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER( &ld->ld_req_mutex );
LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER( &ld->ld_res_mutex );
#endif