]> git.sur5r.net Git - openldap/commitdiff
Enclose debug variables in #ifdef LDAP_DEBUG
authorHallvard Furuseth <hallvard@openldap.org>
Thu, 5 Nov 1998 05:03:12 +0000 (05:03 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Thu, 5 Nov 1998 05:03:12 +0000 (05:03 +0000)
include/lber.h
include/ldap.h
servers/slapd/aclparse.c
servers/slapd/back-ldbm/cache.c
servers/slapd/back-ldbm/id2entry.c
servers/slapd/entry.c

index e2745a1679eda83616f175400b0ab9b34f406a4a..a2e006fab385d652ffac0a79024a276881c38a08 100644 (file)
@@ -92,7 +92,9 @@ struct berval {
        char            *bv_val;
 };
 
+#ifdef LDAP_DEBUG
 extern int lber_debug;
+#endif
 
 /*
  * in bprint.c:
index a0b0edc1615ec633ccb5f1dd7e98eb27c3b80db8..c2501db475727614f87b6622ce9653516522cf16 100644 (file)
@@ -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 {
index cc208217bbb1a7bc39ca3bf27cebe9c1ce8b87cf..e47a00380a858ec266e7aad482e982bdf08dec10 100644 (file)
@@ -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,
index 940a226b842404c47cf1d064af21182392832b8e..4f2fa101072f38ccb750adfdb35a151dc9b39770 100644 (file)
@@ -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 );
index b2f0aebf8d7228ce34ace36139673e7aaea64e32..c458ca503ffe8f1dc1d49826a3e80cc7b0498181 100644 (file)
@@ -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 ) );
index c0474e20238eded3a92d3bce734e248856d8e924..80617959e04fa3a386b29982ecb5bb5aa0b0880e 100644 (file)
@@ -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 );