]> git.sur5r.net Git - openldap/commitdiff
ITS#5922 - disable meter for non-default debug settings
authorHoward Chu <hyc@openldap.org>
Thu, 5 Feb 2009 20:57:17 +0000 (20:57 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 5 Feb 2009 20:57:17 +0000 (20:57 +0000)
servers/slapd/slapadd.c

index 383b6487cc8bc751f7d4066d84a9bad9416c856e..d975034313f1696bcc9b29f647347dcab4f2fc96 100644 (file)
@@ -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,