diff options
author | sfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-01-25 23:00:29 +0000 |
---|---|---|
committer | sfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-01-25 23:00:29 +0000 |
commit | 215c5a4ad855cb9df7da04569ae76f00278b35d9 (patch) | |
tree | a937e2fff7fc2895a7448ecc4d6042c7d9568031 /proto_hier_stats.c | |
parent | f6782b9eabf6fd481261cc09ab480adc3c67e70d (diff) |
Fix for bug #1325: Protocol hierarchy display shows an empty line because of
the hop-by-hop option header tree in the main protocol tree. This fix skips
those entries that don't have a name assigned to them and goes on to the next
entry before adding it to the protocol hierarchy display.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20558 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'proto_hier_stats.c')
-rw-r--r-- | proto_hier_stats.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/proto_hier_stats.c b/proto_hier_stats.c index 8706001e64..3710f4f565 100644 --- a/proto_hier_stats.c +++ b/proto_hier_stats.c @@ -34,6 +34,7 @@ #include <wtap.h> #include <stdio.h> +#include <string.h> #include <glib.h> /* Update the progress bar this many times when scanning the packet list. */ @@ -107,6 +108,14 @@ process_node(proto_node *ptree_node, GNode *parent_stat_node, ph_stats_t *ps, gu proto_sibling_node = ptree_node->next; if (proto_sibling_node) { + /* If the name does not exist for this proto_sibling_node, then it is + * not a normal protocol in the top-level tree. It was instead + * added as a normal tree such as IPv6's Hop-by-hop Option Header and + * should be skipped when creating the protocol hierarchy display. */ + if(strlen(proto_sibling_node->finfo->hfinfo->name) == 0 && + ptree_node->next) + proto_sibling_node = proto_sibling_node->next; + process_node(proto_sibling_node, stat_node, ps, pkt_len); } else { |