aboutsummaryrefslogtreecommitdiffstats
path: root/tethereal.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-05-18 08:35:01 +0000
committerGuy Harris <guy@alum.mit.edu>2000-05-18 08:35:01 +0000
commit7bf3c7523b169297103999ae8909c8eb452780bb (patch)
tree0dc7f7511d4ad202e9577e9d4032e1943937da39 /tethereal.c
parent4a9e0166ce146c8f4c117fe6a1858d052eaa3a11 (diff)
Have "proto_tree_is_visible" false except when we're in the middle of
doing something that requires that the text for protocol tree entries be generated, i.e. 1) initialize it to FALSE; 2) have every routine that sets it clear it when it's done; 3) when printing packets, set it to TRUE only if we're not just printing packet summary lines; and then get rid of settings to FALSE made unnecessary as a result of those changes. This makes sure it's not set when it doesn't have to be (which causes the protocol tree code to format the text when it doesn't have to, wasting CPU time). svn path=/trunk/; revision=1973
Diffstat (limited to 'tethereal.c')
-rw-r--r--tethereal.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tethereal.c b/tethereal.c
index e24f734af9..be39197e49 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -1,6 +1,6 @@
/* tethereal.c
*
- * $Id: tethereal.c,v 1.26 2000/04/14 05:39:43 gram Exp $
+ * $Id: tethereal.c,v 1.27 2000/05/18 08:35:01 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -857,6 +857,10 @@ wtap_dispatch_cb_print(u_char *user, const struct wtap_pkthdr *phdr, int offset,
cf->count++;
+ /* The protocol tree will be "visible", i.e., printed, only if we're
+ not printing a summary. */
+ proto_tree_is_visible = verbose;
+
fill_in_fdata(&fdata, cf, phdr, offset);
passed = TRUE;
@@ -912,6 +916,8 @@ wtap_dispatch_cb_print(u_char *user, const struct wtap_pkthdr *phdr, int offset,
}
if (protocol_tree != NULL)
proto_tree_free(protocol_tree);
+
+ proto_tree_is_visible = FALSE;
}
char *