aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tnef.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-14 09:23:33 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-14 21:54:27 +0000
commit28ea58251c04562cc0670e57bf073dc6966e73e6 (patch)
treeabe57292f17b280056a73ee7cfdc94abdcaaaaf3 /epan/dissectors/packet-tnef.c
parent13101020e12eb21e8464a3c4eb4fc2fe51409235 (diff)
register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most. This concludes a "first pass" over the dissector directory. Change-Id: If5ce5484214be50fe541cba478da1de62e354297 Reviewed-on: https://code.wireshark.org/review/11830 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-tnef.c')
-rw-r--r--epan/dissectors/packet-tnef.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-tnef.c b/epan/dissectors/packet-tnef.c
index 09f48be1f3..27b65b4866 100644
--- a/epan/dissectors/packet-tnef.c
+++ b/epan/dissectors/packet-tnef.c
@@ -486,7 +486,7 @@ static void dissect_mapiprops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
}
-static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *attr_item, *item;
proto_tree *attr_tree, *tag_tree, *props_tree, *addr_tree, *date_tree;
@@ -511,7 +511,7 @@ static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
expert_add_info_format(pinfo, item, &ei_tnef_incorrect_signature,
" [Incorrect, should be 0x%x. No further dissection possible. Check any Content-Transfer-Encoding has been removed.]", TNEF_SIGNATURE);
- return;
+ return offset;
} else {
@@ -618,6 +618,8 @@ static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* there may be some padding */
if(tvb_reported_length_remaining(tvb, offset)) /* XXX: Not sure if they is really padding or not */
proto_tree_add_item(tree, hf_tnef_padding, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_NA);
+
+ return tvb_captured_length(tvb);
}
static void dissect_tnef_file(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -628,7 +630,7 @@ static void dissect_tnef_file(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
col_append_str(pinfo->cinfo, COL_INFO, PNAME);
- dissect_tnef(tvb, pinfo, tree);
+ dissect_tnef(tvb, pinfo, tree, NULL);
}
/* Register all the bits needed by the filtering engine */
@@ -817,7 +819,7 @@ proto_register_tnef(void)
expert_register_field_array(expert_tnef, ei, array_length(ei));
/* Allow dissector to find be found by name. */
- tnef_handle = register_dissector(PFNAME, dissect_tnef, proto_tnef);
+ tnef_handle = new_register_dissector(PFNAME, dissect_tnef, proto_tnef);
}