--- libraries/liblber/decode.c 2007/08/24 19:58:20 1.111 +++ libraries/liblber/decode.c 2007/10/17 23:35:07 1.112 @@ -1,5 +1,5 @@ /* decode.c - ber input decoding routines */ -/* $OpenLDAP: pkg/ldap/libraries/liblber/decode.c,v 1.110 2007/07/23 10:57:23 hallvard Exp $ */ +/* $OpenLDAP: pkg/ldap/libraries/liblber/decode.c,v 1.111 2007/08/24 19:58:20 hyc Exp $ */ /* This work is part of OpenLDAP Software . * * Copyright 1998-2007 The OpenLDAP Foundation. @@ -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