summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-21 02:44:31 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-21 02:44:31 +0000
commit236e44c65a110db2f92811f4e94aadc42e3ebd05 (patch)
tree6022c1e0d5d0e290a589df6b0b10cf5b1ac6c427 /source4/librpc
parent38ce2ef4bb05b463f1a3484665c88ae55bbd7b72 (diff)
downloadsamba-236e44c65a110db2f92811f4e94aadc42e3ebd05.tar.gz
samba-236e44c65a110db2f92811f4e94aadc42e3ebd05.tar.bz2
samba-236e44c65a110db2f92811f4e94aadc42e3ebd05.zip
only display really verbose packet dumps when smbtorture is run at
debug level 2 or above. This is more useful for checking that something hasn't broken without swamping yourself with output. (This used to be commit 53ff3a572a23c2f45c5d503255bc6b535ca99134)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/ndr/ndr.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c
index 56e0e5f0ed..bd0d9ce4cb 100644
--- a/source4/librpc/ndr/ndr.c
+++ b/source4/librpc/ndr/ndr.c
@@ -292,10 +292,10 @@ static void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ..
va_end(ap);
for (i=0;i<ndr->depth;i++) {
- DEBUG(0,(" "));
+ DEBUG(2,(" "));
}
- DEBUG(0,("%s\n", s));
+ DEBUG(2,("%s\n", s));
free(s);
}
@@ -308,6 +308,10 @@ void ndr_print_debug(void (*fn)(struct ndr_print *, const char *, void *),
{
struct ndr_print ndr;
+ if (!DEBUGLVL(2)) {
+ return;
+ }
+
ndr.mem_ctx = talloc_init("ndr_print_debug");
if (!ndr.mem_ctx) return;
ndr.print = ndr_print_debug_helper;