]> git.sur5r.net Git - openldap/commitdiff
Cleanup debug calls
authorHoward Chu <hyc@openldap.org>
Thu, 18 Oct 2007 01:35:07 +0000 (01:35 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 18 Oct 2007 01:35:07 +0000 (01:35 +0000)
libraries/liblber/decode.c
libraries/liblber/io.c

index f2261e7bd50f4017747005dbf0127216d7a6a7b0..0870f0b7b442c4a543046610cb6b829c858cf44b 100644 (file)
@@ -780,9 +780,11 @@ ber_scanf ( BerElement *ber,
 
        fmt_reset = fmt;
 
-       ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
-               "ber_scanf fmt (%s) ber:\n", fmt );
-       ber_log_dump( LDAP_DEBUG_BER, ber->ber_debug, ber, 1 );
+       if ( ber->ber_debug & (LDAP_DEBUG_TRACE|LDAP_DEBUG_BER)) {
+               ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
+                       "ber_scanf fmt (%s) ber:\n", fmt );
+               ber_log_dump( LDAP_DEBUG_BER, ber->ber_debug, ber, 1 );
+       }
 
        for ( rc = 0; *fmt && rc != LBER_DEFAULT; fmt++ ) {
                /* When this is modified, remember to update
index 4f4afa390f1f486a30764b3afa06b6fce7b012c6..391996704b58e92eb06a9e3b386e7146d282e9f2 100644 (file)
@@ -488,8 +488,10 @@ ber_get_next(
        assert( SOCKBUF_VALID( sb ) );
        assert( LBER_VALID( ber ) );
 
-       ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
-               "ber_get_next\n" );
+       if ( ber->ber_debug & LDAP_DEBUG_TRACE ) {
+               ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
+                       "ber_get_next\n" );
+       }
 
        /*
         * Any ber element looks like this: tag length contents.