mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 10:07:56 -05:00
Enclose debug variables in #ifdef LDAP_DEBUG
This commit is contained in:
parent
c6e48d6770
commit
83ec12246e
6 changed files with 15 additions and 2 deletions
|
|
@ -92,7 +92,9 @@ struct berval {
|
|||
char *bv_val;
|
||||
};
|
||||
|
||||
#ifdef LDAP_DEBUG
|
||||
extern int lber_debug;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* in bprint.c:
|
||||
|
|
|
|||
|
|
@ -67,7 +67,9 @@ LDAP_BEGIN_DECL
|
|||
#define LDAP_OPT_SUCCESS 0
|
||||
#define LDAP_OPT_ERROR (-1)
|
||||
|
||||
#ifdef LDAP_DEBUG
|
||||
extern int ldap_debug;
|
||||
#endif
|
||||
|
||||
#define LDAP_API_INFO_VERSION 1
|
||||
typedef struct ldapapiinfo {
|
||||
|
|
|
|||
|
|
@ -293,9 +293,10 @@ parse_acl(
|
|||
|
||||
} else {
|
||||
|
||||
if (ldap_debug&LDAP_DEBUG_ACL)
|
||||
#ifdef LDAP_DEBUG
|
||||
if (ldap_debug & LDAP_DEBUG_ACL)
|
||||
print_acl(a);
|
||||
|
||||
#endif
|
||||
|
||||
if ( a->acl_access == NULL ) {
|
||||
fprintf( stderr,
|
||||
|
|
|
|||
|
|
@ -198,7 +198,9 @@ cache_add_entry_lock(
|
|||
e = cache->c_lrutail;
|
||||
|
||||
/* XXX check for writer lock - should also check no readers pending */
|
||||
#ifdef LDAP_DEBUG
|
||||
assert(pthread_rdwr_wchk_np(&e->e_rdwr));
|
||||
#endif
|
||||
|
||||
/* delete from cache and lru q */
|
||||
rc = cache_delete_entry_internal( cache, e );
|
||||
|
|
@ -394,7 +396,9 @@ cache_delete_entry(
|
|||
Debug( LDAP_DEBUG_TRACE, "====> cache_delete_entry:\n", 0, 0, 0 );
|
||||
|
||||
/* XXX check for writer lock - should also check no readers pending */
|
||||
#ifdef LDAP_DEBUG
|
||||
assert(pthread_rdwr_wchk_np(&e->e_rdwr));
|
||||
#endif
|
||||
|
||||
/* set cache mutex */
|
||||
pthread_mutex_lock( &cache->c_mutex );
|
||||
|
|
|
|||
|
|
@ -74,7 +74,9 @@ id2entry_delete( Backend *be, Entry *e )
|
|||
e->e_dn, 0 );
|
||||
|
||||
/* XXX - check for writer lock - should also check no reader pending */
|
||||
#ifdef LDAP_DEBUG
|
||||
assert(pthread_rdwr_wchk_np(&e->e_rdwr));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BERKELEY_DB2
|
||||
memset( &key, 0, sizeof( key ) );
|
||||
|
|
|
|||
|
|
@ -195,8 +195,10 @@ entry_free( Entry *e )
|
|||
Attribute *a, *next;
|
||||
|
||||
/* XXX check that no reader/writer locks exist */
|
||||
#ifdef LDAP_DEBUG
|
||||
assert( !pthread_rdwr_wchk_np(&e->e_rdwr) &&
|
||||
!pthread_rdwr_rchk_np(&e->e_rdwr) );
|
||||
#endif
|
||||
|
||||
if ( e->e_dn != NULL ) {
|
||||
free( e->e_dn );
|
||||
|
|
|
|||
Loading…
Reference in a new issue