mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ITS#9201 fix LDAP_THREAD_DEBUG
Add missing defs to ldap_thr_debug.h. slap tools must init libldap so internal mutexes get inited.
This commit is contained in:
parent
b51faa5cf0
commit
b24ca75993
@ -604,6 +604,9 @@ void ldap_int_initialize_global_options( struct ldapoptions *gopts, int *dbglvl
|
|||||||
gopts->ldo_keepalive_interval = 0;
|
gopts->ldo_keepalive_interval = 0;
|
||||||
gopts->ldo_keepalive_idle = 0;
|
gopts->ldo_keepalive_idle = 0;
|
||||||
|
|
||||||
|
#ifdef LDAP_R_COMPILE
|
||||||
|
ldap_pvt_thread_mutex_init( &gopts->ldo_mutex );
|
||||||
|
#endif
|
||||||
gopts->ldo_valid = LDAP_INITIALIZED;
|
gopts->ldo_valid = LDAP_INITIALIZED;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -83,6 +83,7 @@
|
|||||||
#define ldap_pvt_thread_cond_broadcast ldap_int_thread_cond_broadcast
|
#define ldap_pvt_thread_cond_broadcast ldap_int_thread_cond_broadcast
|
||||||
#define ldap_pvt_thread_cond_wait ldap_int_thread_cond_wait
|
#define ldap_pvt_thread_cond_wait ldap_int_thread_cond_wait
|
||||||
#define ldap_pvt_thread_mutex_init ldap_int_thread_mutex_init
|
#define ldap_pvt_thread_mutex_init ldap_int_thread_mutex_init
|
||||||
|
#define ldap_pvt_thread_mutex_recursive_init ldap_int_thread_mutex_recursive_init
|
||||||
#define ldap_pvt_thread_mutex_destroy ldap_int_thread_mutex_destroy
|
#define ldap_pvt_thread_mutex_destroy ldap_int_thread_mutex_destroy
|
||||||
#define ldap_pvt_thread_mutex_lock ldap_int_thread_mutex_lock
|
#define ldap_pvt_thread_mutex_lock ldap_int_thread_mutex_lock
|
||||||
#define ldap_pvt_thread_mutex_trylock ldap_int_thread_mutex_trylock
|
#define ldap_pvt_thread_mutex_trylock ldap_int_thread_mutex_trylock
|
||||||
@ -118,6 +119,8 @@
|
|||||||
#define ldap_pvt_thread_pool_pause ldap_int_thread_pool_pause
|
#define ldap_pvt_thread_pool_pause ldap_int_thread_pool_pause
|
||||||
#define ldap_pvt_thread_pool_resume ldap_int_thread_pool_resume
|
#define ldap_pvt_thread_pool_resume ldap_int_thread_pool_resume
|
||||||
#define ldap_pvt_thread_pool_destroy ldap_int_thread_pool_destroy
|
#define ldap_pvt_thread_pool_destroy ldap_int_thread_pool_destroy
|
||||||
|
#define ldap_pvt_thread_pool_close ldap_int_thread_pool_close
|
||||||
|
#define ldap_pvt_thread_pool_free ldap_int_thread_pool_free
|
||||||
#define ldap_pvt_thread_pool_getkey ldap_int_thread_pool_getkey
|
#define ldap_pvt_thread_pool_getkey ldap_int_thread_pool_getkey
|
||||||
#define ldap_pvt_thread_pool_setkey ldap_int_thread_pool_setkey
|
#define ldap_pvt_thread_pool_setkey ldap_int_thread_pool_setkey
|
||||||
#define ldap_pvt_thread_pool_purgekey ldap_int_thread_pool_purgekey
|
#define ldap_pvt_thread_pool_purgekey ldap_int_thread_pool_purgekey
|
||||||
@ -135,9 +138,11 @@
|
|||||||
*/
|
*/
|
||||||
#undef ldap_pvt_thread_pool_destroy
|
#undef ldap_pvt_thread_pool_destroy
|
||||||
#define ldap_pvt_thread_pool_destroy(p,r) ldap_int_thread_pool_destroy(p,r)
|
#define ldap_pvt_thread_pool_destroy(p,r) ldap_int_thread_pool_destroy(p,r)
|
||||||
|
#if 0
|
||||||
#define ldap_pvt_thread_pool_close(p,r) ldap_int_thread_pool_close(p,r)
|
#define ldap_pvt_thread_pool_close(p,r) ldap_int_thread_pool_close(p,r)
|
||||||
#define ldap_pvt_thread_pool_free(p) ldap_int_thread_pool_free(p)
|
#define ldap_pvt_thread_pool_free(p) ldap_int_thread_pool_free(p)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef LDAP_THREAD_DEBUG_IMPLEMENTATION /* thr_debug.c */
|
#ifdef LDAP_THREAD_DEBUG_IMPLEMENTATION /* thr_debug.c */
|
||||||
#undef ldap_pvt_thread_mutex_t
|
#undef ldap_pvt_thread_mutex_t
|
||||||
@ -156,6 +161,7 @@
|
|||||||
#undef ldap_pvt_thread_cond_broadcast
|
#undef ldap_pvt_thread_cond_broadcast
|
||||||
#undef ldap_pvt_thread_cond_wait
|
#undef ldap_pvt_thread_cond_wait
|
||||||
#undef ldap_pvt_thread_mutex_init
|
#undef ldap_pvt_thread_mutex_init
|
||||||
|
#undef ldap_pvt_thread_mutex_recursive_init
|
||||||
#undef ldap_pvt_thread_mutex_destroy
|
#undef ldap_pvt_thread_mutex_destroy
|
||||||
#undef ldap_pvt_thread_mutex_lock
|
#undef ldap_pvt_thread_mutex_lock
|
||||||
#undef ldap_pvt_thread_mutex_trylock
|
#undef ldap_pvt_thread_mutex_trylock
|
||||||
@ -183,6 +189,8 @@
|
|||||||
#undef ldap_pvt_thread_pool_pause
|
#undef ldap_pvt_thread_pool_pause
|
||||||
#undef ldap_pvt_thread_pool_resume
|
#undef ldap_pvt_thread_pool_resume
|
||||||
#undef ldap_pvt_thread_pool_destroy
|
#undef ldap_pvt_thread_pool_destroy
|
||||||
|
#undef ldap_pvt_thread_pool_close
|
||||||
|
#undef ldap_pvt_thread_pool_free
|
||||||
#undef ldap_pvt_thread_pool_getkey
|
#undef ldap_pvt_thread_pool_getkey
|
||||||
#undef ldap_pvt_thread_pool_setkey
|
#undef ldap_pvt_thread_pool_setkey
|
||||||
#undef ldap_pvt_thread_pool_purgekey
|
#undef ldap_pvt_thread_pool_purgekey
|
||||||
|
@ -294,6 +294,8 @@ slap_tool_init(
|
|||||||
ldif_debug = slap_debug;
|
ldif_debug = slap_debug;
|
||||||
#endif
|
#endif
|
||||||
ldap_syslog = 0;
|
ldap_syslog = 0;
|
||||||
|
/* make sure libldap gets init'd */
|
||||||
|
ldap_set_option( NULL, LDAP_OPT_DEBUG_LEVEL, &slap_debug );
|
||||||
|
|
||||||
#ifdef CSRIMALLOC
|
#ifdef CSRIMALLOC
|
||||||
leakfilename = malloc( strlen( progname ) + STRLENOF( ".leak" ) + 1 );
|
leakfilename = malloc( strlen( progname ) + STRLENOF( ".leak" ) + 1 );
|
||||||
|
Loading…
Reference in New Issue
Block a user