mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-28 01:29:18 -05:00
ITS#9235 Fix librewrite compile without threads
This commit is contained in:
parent
c4b6aad6cb
commit
1f39b05f37
2 changed files with 6 additions and 1 deletions
|
|
@ -47,9 +47,10 @@
|
|||
#undef strdup
|
||||
#define strdup(x) ber_strdup(x)
|
||||
|
||||
/* Uncomment to use ldap pvt threads */
|
||||
#ifndef NO_THREADS
|
||||
#define USE_REWRITE_LDAP_PVT_THREADS
|
||||
#include <ldap_pvt_thread.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* For details, see RATIONALE.
|
||||
|
|
|
|||
|
|
@ -185,7 +185,9 @@ rewrite_session_return(
|
|||
{
|
||||
assert( session != NULL );
|
||||
session->ls_count--;
|
||||
#ifdef USE_REWRITE_LDAP_PVT_THREADS
|
||||
ldap_pvt_thread_mutex_unlock( &session->ls_mutex );
|
||||
#endif /* USE_REWRITE_LDAP_PVT_THREADS */
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -329,7 +331,9 @@ rewrite_session_free( void *v_session )
|
|||
{
|
||||
struct rewrite_session *session = (struct rewrite_session *)v_session;
|
||||
|
||||
#ifdef USE_REWRITE_LDAP_PVT_THREADS
|
||||
ldap_pvt_thread_mutex_lock( &session->ls_mutex );
|
||||
#endif /* USE_REWRITE_LDAP_PVT_THREADS */
|
||||
rewrite_session_clean( v_session );
|
||||
free( v_session );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue