From 4adeb424f5cdb74ca1f98cd4b87bd72e4d811f03 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Tue, 17 Nov 2015 20:16:06 -0500 Subject: create_dissector_handle -> new_create_dissector_handle Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I9c7d1c092bbae896ec0c2832617891346927f2e1 Reviewed-on: https://code.wireshark.org/review/11932 Reviewed-by: Michael Mann Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/dissectors/packet-pcapng_block.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'epan/dissectors/packet-pcapng_block.c') diff --git a/epan/dissectors/packet-pcapng_block.c b/epan/dissectors/packet-pcapng_block.c index 831c55bd0b..c1bd9d8016 100644 --- a/epan/dissectors/packet-pcapng_block.c +++ b/epan/dissectors/packet-pcapng_block.c @@ -33,8 +33,8 @@ static int proto_pcapng_block = -1; static dissector_table_t pcapng_block_type_dissector_table; -static void -dissect_pcapng_block(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_pcapng_block(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { /* * Call the dissector for the block type of this block, if there @@ -51,6 +51,7 @@ dissect_pcapng_block(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(tree, proto_pcapng_block, tvb, 0, -1, ENC_NA); } + return tvb_captured_length(tvb); } void proto_register_pcapng_block(void) @@ -66,7 +67,7 @@ proto_reg_handoff_pcapng_block(void) { dissector_handle_t pcapng_block_handle; - pcapng_block_handle = create_dissector_handle(dissect_pcapng_block, + pcapng_block_handle = new_create_dissector_handle(dissect_pcapng_block, proto_pcapng_block); dissector_add_uint("wtap_fts_rec", WTAP_FILE_TYPE_SUBTYPE_PCAPNG, pcapng_block_handle); -- cgit v1.2.3