diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-15 08:00:10 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-16 03:50:05 +0000 |
commit | bbdd89b973353a0df1d98d884c38f3832670bfea (patch) | |
tree | 9b992f923f565af2fcab30902508a191de85ca53 /epan/dissectors/packet-artnet.c | |
parent | 6012ba8f008bfba24fd44ce7a2a3055572453dce (diff) |
create_dissector_handle -> new_create_dissector_handle
Picking off "easy" dissectors that only have one or two exit points at most.
Change-Id: Ie514f126352e7598acc4f7c38db9c61d105d5e48
Reviewed-on: https://code.wireshark.org/review/11850
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-artnet.c')
-rw-r--r-- | epan/dissectors/packet-artnet.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-artnet.c b/epan/dissectors/packet-artnet.c index beaa3b4999..1f9e7fa95a 100644 --- a/epan/dissectors/packet-artnet.c +++ b/epan/dissectors/packet-artnet.c @@ -3096,8 +3096,8 @@ dissect_artnet_file_fn_reply(tvbuff_t *tvb _U_, guint offset, proto_tree *tree _ return offset; } -static void -dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { +static int +dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { gint offset = 0; guint size; guint16 opcode; @@ -3784,13 +3784,14 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { if (tvb_reported_length_remaining(tvb, offset) > 0) { proto_tree_add_item(artnet_tree, hf_artnet_data, tvb, offset, -1, ENC_NA); } - return; + return tvb_captured_length(tvb); } if (tvb_reported_length_remaining(tvb, offset) > 0) { proto_tree_add_item(artnet_tree, hf_artnet_excess_bytes, tvb, offset, -1, ENC_NA); } + return tvb_captured_length(tvb); } /* Heuristic dissector */ @@ -3809,7 +3810,7 @@ dissect_artnet_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d return FALSE; /* if the header matches, dissect it */ - dissect_artnet(tvb, pinfo, tree); + dissect_artnet(tvb, pinfo, tree, data); return TRUE; } @@ -5260,7 +5261,7 @@ void proto_reg_handoff_artnet(void) { dissector_handle_t artnet_handle; - artnet_handle = create_dissector_handle(dissect_artnet, proto_artnet); + artnet_handle = new_create_dissector_handle(dissect_artnet, proto_artnet); dissector_add_for_decode_as("udp.port", artnet_handle); rdm_handle = find_dissector("rdm"); dmx_chan_handle = find_dissector("dmx-chan"); |