From: Howard Chu Date: Thu, 5 Feb 2009 20:57:17 +0000 (+0000) Subject: ITS#5922 - disable meter for non-default debug settings X-Git-Tag: ACLCHECK_0~878 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f719c364c59abed050e0e916345c21b0b127957c;p=openldap ITS#5922 - disable meter for non-default debug settings --- diff --git a/servers/slapd/slapadd.c b/servers/slapd/slapadd.c index 383b6487cc..d975034313 100644 --- a/servers/slapd/slapadd.c +++ b/servers/slapd/slapadd.c @@ -126,8 +126,12 @@ slapadd( int argc, char **argv ) } if ( enable_meter - && !fstat ( fileno ( ldiffp->fp ), &stat_buf ) - && S_ISREG(stat_buf.st_mode) ) { +#ifdef LDAP_DEBUG + /* tools default to "none" */ + && slap_debug == LDAP_DEBUG_NONE +#endif + && !fstat ( fileno ( ldiffp->fp ), &stat_buf ) + && S_ISREG(stat_buf.st_mode) ) { enable_meter = !lutil_meter_open( &meter, &lutil_meter_text_display,