aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-08-10 20:33:01 +0000
committerGerald Combs <gerald@wireshark.org>2012-08-10 20:33:01 +0000
commitcd3cca7edca2c52fea2afce5f248370f5fdcbd4f (patch)
tree2def04abc1c80331776942f588ecae42cfe85291 /epan/proto.c
parentf464eb4b5839cc1a9a222c6a5e3f701af4cb1305 (diff)
Make the corresponding packet_info available to each tree item. This
lets us pass a NULL pinfo to expert_add_info_format() and expert_add_undecoded_item(), which makes it possible to use those routines deep in the bowels of many dissectors. As a proof of concept remove the recent pinfo additions to packet-afp.c. This should also make it easier to fix bug 3884. svn path=/trunk/; revision=44435
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 6bb833d007..a024176a79 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -4186,7 +4186,7 @@ proto_item_set_expert_flags(proto_item *pi, const int group, const guint severit
}
proto_tree *
-proto_tree_create_root(void)
+proto_tree_create_root(packet_info *pinfo)
{
proto_node *pnode;
@@ -4196,6 +4196,9 @@ proto_tree_create_root(void)
PNODE_FINFO(pnode) = NULL;
pnode->tree_data = g_new(tree_data_t, 1);
+ /* Make sure we can access pinfo everywhere */
+ pnode->tree_data->pinfo = pinfo;
+
/* Don't initialize the tree_data_t. Wait until we know we need it */
pnode->tree_data->interesting_hfids = NULL;