From 2fe0fc5a1afbbd8218190736decbecec14582691 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sun, 8 Nov 2015 19:30:18 -0500 Subject: Convert some TCP subdissectors to "new" style. Change-Id: I28ce51f3c06f78b85792bce4a13ef39eb75d7890 Reviewed-on: https://code.wireshark.org/review/11648 Petri-Dish: Michael Mann Reviewed-by: Michael Mann --- epan/dissectors/packet-bzr.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'epan/dissectors/packet-bzr.c') diff --git a/epan/dissectors/packet-bzr.c b/epan/dissectors/packet-bzr.c index b53c327dbb..88798c61f5 100644 --- a/epan/dissectors/packet-bzr.c +++ b/epan/dissectors/packet-bzr.c @@ -224,8 +224,8 @@ dissect_bzr_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /*offset +=*/ dissect_body(tvb, offset, pinfo, bzr_tree); } -static void -dissect_bzr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_bzr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { gint offset = 0, pdu_len; tvbuff_t *next_tvb; @@ -240,7 +240,7 @@ dissect_bzr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (pinfo->can_desegment && bzr_desegment) { pinfo->desegment_offset = offset; pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT; - return; + return tvb_captured_length(tvb); } else { pdu_len = tvb_reported_length_remaining(tvb, offset); } @@ -249,6 +249,8 @@ dissect_bzr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dissect_bzr_pdu(next_tvb, pinfo, tree); offset += pdu_len; } + + return tvb_captured_length(tvb); } void @@ -300,7 +302,7 @@ proto_register_bzr(void) module_t *bzr_module; proto_bzr = proto_register_protocol("Bazaar Smart Protocol", "Bazaar", "bzr"); - register_dissector("bzr", dissect_bzr, proto_bzr); + new_register_dissector("bzr", dissect_bzr, proto_bzr); proto_register_field_array(proto_bzr, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); -- cgit v1.2.3