vc_conn_t tmp = { 0 };
AC_MEMCPY( (char *)&tmp.conn, (const char *)cookie.bv_val, cookie.bv_len );
- ldap_pvt_mutex_lock( &vc_mutex );
+ ldap_pvt_thread_mutex_lock( &vc_mutex );
conn = (vc_conn_t *)avl_find( vc_tree, (caddr_t)&tmp, vc_conn_cmp );
if ( conn == NULL || ( conn != NULL && conn->refcnt != 0 ) ) {
conn = NULL;
- ldap_pvt_mutex_unlock( &vc_mutex );
+ ldap_pvt_thread_mutex_unlock( &vc_mutex );
rs->sr_err = LDAP_PROTOCOL_ERROR;
goto done;
}
conn->refcnt++;
- ldap_pvt_mutex_unlock( &vc_mutex );
+ ldap_pvt_thread_mutex_unlock( &vc_mutex );
} else {
void *thrctx;
if ( conn->conn == NULL ) {
conn->conn = conn;
conn->refcnt--;
- ldap_pvt_mutex_lock( &vc_mutex );
+ ldap_pvt_thread_mutex_lock( &vc_mutex );
rc = avl_insert( &vc_tree, (caddr_t)conn,
vc_conn_cmp, vc_conn_dup );
- ldap_pvt_mutex_unlock( &vc_mutex );
+ ldap_pvt_thread_mutex_unlock( &vc_mutex );
assert( rc == 0 );
} else {
- ldap_pvt_mutex_lock( &vc_mutex );
+ ldap_pvt_thread_mutex_lock( &vc_mutex );
conn->refcnt--;
- ldap_pvt_mutex_unlock( &vc_mutex );
+ ldap_pvt_thread_mutex_unlock( &vc_mutex );
}
} else {
if ( conn->conn != NULL ) {
vc_conn_t *tmp;
- ldap_pvt_mutex_lock( &vc_mutex );
+ ldap_pvt_thread_mutex_lock( &vc_mutex );
tmp = avl_delete( &vc_tree, (caddr_t)conn, vc_conn_cmp );
- ldap_pvt_mutex_unlock( &vc_mutex );
+ ldap_pvt_thread_mutex_unlock( &vc_mutex );
}
SLAP_FREE( conn );
}