From f719c364c59abed050e0e916345c21b0b127957c Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 5 Feb 2009 20:57:17 +0000 Subject: [PATCH] ITS#5922 - disable meter for non-default debug settings --- servers/slapd/slapadd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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, -- 2.39.5