From dcfea6a06ddf7adeafc8613efe74310251201789 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Tue, 24 Nov 2015 21:59:51 -0500 Subject: create_dissector_handle -> new_create_dissector_handle This finalizes the transformation for dissectors. Change-Id: Ie5986b72bb69a6e8779ca3f5e20a80357c9e6fea Reviewed-on: https://code.wireshark.org/review/12122 Petri-Dish: Michael Mann Reviewed-by: Michael Mann --- epan/dissectors/packet-fip.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'epan/dissectors/packet-fip.c') diff --git a/epan/dissectors/packet-fip.c b/epan/dissectors/packet-fip.c index 1a2fa2a9bd..6805414fb9 100644 --- a/epan/dissectors/packet-fip.c +++ b/epan/dissectors/packet-fip.c @@ -339,8 +339,8 @@ fip_desc_fc4f(tvbuff_t *tvb, proto_tree *tree, proto_item *item) } } -static void -dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { guint op; guint sub; @@ -361,10 +361,9 @@ dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (!tvb_bytes_exist(tvb, 0, FIP_HEADER_LEN)) { col_set_str(pinfo->cinfo, COL_INFO, "[packet too short]"); - if (tree) - proto_tree_add_protocol_format(tree, proto_fip, tvb, 0, + proto_tree_add_protocol_format(tree, proto_fip, tvb, 0, -1, "FIP [packet too short]"); - return; + return tvb_captured_length(tvb); } op = tvb_get_ntohs(tvb, 2); @@ -544,6 +543,7 @@ dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; } } + return tvb_captured_length(tvb); } void @@ -825,7 +825,7 @@ proto_reg_handoff_fip(void) { dissector_handle_t fip_handle; - fip_handle = create_dissector_handle(dissect_fip, proto_fip); + fip_handle = new_create_dissector_handle(dissect_fip, proto_fip); dissector_add_uint("ethertype", ETHERTYPE_FIP, fip_handle); fc_handle = find_dissector("fc"); } -- cgit v1.2.3