aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-09-04 21:20:08 +0000
committerGuy Harris <guy@alum.mit.edu>2004-09-04 21:20:08 +0000
commit94e6a44cb49755a621de1bc73983d2b0880fed9d (patch)
tree1357de7895b830d170f43e3da901d607f2b48782 /epan/dissectors/packet-tcap.c
parent64a239293d0684bfe2154e102c760372534a4c49 (diff)
From Jeff Morriss: the code path that's bypassed with the "if (tree)"
and "if (!tree)" checks updates the Info column and calls subdissectors, so we can't bypass all of it - don't bypass any of it. svn path=/trunk/; revision=11903
Diffstat (limited to 'epan/dissectors/packet-tcap.c')
-rw-r--r--epan/dissectors/packet-tcap.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/epan/dissectors/packet-tcap.c b/epan/dissectors/packet-tcap.c
index 4c87ebf756..e5e3e42ee5 100644
--- a/epan/dissectors/packet-tcap.c
+++ b/epan/dissectors/packet-tcap.c
@@ -2722,23 +2722,19 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "TCAP");
- /* In the interest of speed, if "tree" is NULL, don't do any
- * work not necessary to generate protocol tree items.
- */
- if (tree)
- {
- ti = proto_tree_add_item(tree, proto_tcap, tvb, 0, -1, FALSE);
- tcap_tree = proto_item_add_subtree(ti, ett_tcap);
- g_tcap_tree = tree;
+ /* Dissect the packet (even if !tree so can call sub-dissectors and update
+ * the INFO column) */
+ ti = proto_tree_add_item(tree, proto_tcap, tvb, 0, -1, FALSE);
+ tcap_tree = proto_item_add_subtree(ti, ett_tcap);
+ g_tcap_tree = tree;
- if (tcap_standard == ITU_TCAP_STANDARD)
- {
- dissect_tcap_message(tvb, pinfo, tcap_tree);
- }
- else
- {
- dissect_ansi_tcap_message(tvb, pinfo, tcap_tree);
- }
+ if (tcap_standard == ITU_TCAP_STANDARD)
+ {
+ dissect_tcap_message(tvb, pinfo, tcap_tree);
+ }
+ else
+ {
+ dissect_ansi_tcap_message(tvb, pinfo, tcap_tree);
}
}