From 896ea3ab98c00bef02f2041d83ec3564cca6345c Mon Sep 17 00:00:00 2001 From: reyk Date: Fri, 8 Aug 2008 18:56:05 +0000 Subject: [PATCH] only dump all protocol nodes with DEBUG > 1. --- usr.sbin/relayd/relay.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c index 1756de63e0f..9796f92011b 100644 --- a/usr.sbin/relayd/relay.c +++ b/usr.sbin/relayd/relay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay.c,v 1.97 2008/08/08 18:38:14 reyk Exp $ */ +/* $OpenBSD: relay.c,v 1.98 2008/08/08 18:56:05 reyk Exp $ */ /* * Copyright (c) 2006, 2007, 2008 Reyk Floeter @@ -376,20 +376,22 @@ relay_protodebug(struct relay *rlay) show: i = 0; RB_FOREACH(proot, proto_tree, tree) { +#if DEBUG > 1 + i = 0; +#endif PROTONODE_FOREACH(pn, proot, entry) { -#ifndef DEBUG +#if DEBUG > 1 + i = 0; +#endif if (++i > 100) break; -#endif relay_nodedebug(name, pn); } -#ifndef DEBUG /* Limit the number of displayed lines */ if (++i > 100) { fprintf(stderr, "\t\t...\n"); break; } -#endif } if (tree == &proto->request_tree) { name = "response"; -- 2.20.1