From: reyk Date: Fri, 8 Aug 2008 18:56:05 +0000 (+0000) Subject: only dump all protocol nodes with DEBUG > 1. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=896ea3ab98c00bef02f2041d83ec3564cca6345c;p=openbsd only dump all protocol nodes with DEBUG > 1. --- 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";