diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2005-06-04 10:23:10 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2005-06-04 10:23:10 +0000 |
commit | aac3bce7175c52b40f34bbe764a215769807efec (patch) | |
tree | 54cb62c7d25687bde5ac46b4e551eb9f1738908b /proto_hier_stats.c | |
parent | c97555220bbddd86b41569b6b99c135754f121f8 (diff) | |
download | wireshark-aac3bce7175c52b40f34bbe764a215769807efec.tar.gz wireshark-aac3bce7175c52b40f34bbe764a215769807efec.tar.bz2 wireshark-aac3bce7175c52b40f34bbe764a215769807efec.zip |
fix #224: hierarchy stats had problems with the new generated toplevel desegmentation items "[Reassembled TCP Segments]"
svn path=/trunk/; revision=14549
Diffstat (limited to 'proto_hier_stats.c')
-rw-r--r-- | proto_hier_stats.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/proto_hier_stats.c b/proto_hier_stats.c index 995a5c30f7..974d6dc1b3 100644 --- a/proto_hier_stats.c +++ b/proto_hier_stats.c @@ -92,10 +92,16 @@ process_node(proto_node *ptree_node, GNode *parent_stat_node, ph_stats_t *ps, gu finfo = PITEM_FINFO(ptree_node); g_assert(finfo); - stat_node = find_stat_node(parent_stat_node, finfo->hfinfo); + /* if the field info isn't related to a protocol but to a field, don't count them, + * as they don't belong to any protocol. + * (happens e.g. for toplevel tree item of desegmentation "[Reassembled TCP Segments]") */ + if(finfo->hfinfo->parent != -1) { + /* this should only happen for generated items */ + g_assert(PROTO_ITEM_IS_GENERATED(ptree_node)); + return; + } - /* Assert that the finfo is related to a protocol, not a field. */ - g_assert(finfo->hfinfo->parent == -1); + stat_node = find_stat_node(parent_stat_node, finfo->hfinfo); stats = STAT_NODE_STATS(stat_node); stats->num_pkts_total++; |