diff options
Diffstat (limited to 'epan/dissectors/packet-uhd.c')
-rw-r--r-- | epan/dissectors/packet-uhd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/dissectors/packet-uhd.c b/epan/dissectors/packet-uhd.c index 07627ce81e..92ae6c60c4 100644 --- a/epan/dissectors/packet-uhd.c +++ b/epan/dissectors/packet-uhd.c @@ -155,8 +155,8 @@ static const value_string uhd_reg_actions[] = { void proto_reg_handoff_uhd(void); /* dissect a UHD header and hand payload off to respective dissector */ -static void -dissect_uhd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_uhd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { int ind; proto_item *ti; @@ -172,7 +172,7 @@ dissect_uhd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_add_str(pinfo->cinfo, COL_INFO, val_to_str(id, uhd_ids, "Unknown UHD message type '%c'")); if (tree == NULL) - return; + return tvb_captured_length(tvb); ti = proto_tree_add_protocol_format(tree, proto_uhd, tvb, 0, 34, "UHD id = %c ", id); uhd_tree = proto_item_add_subtree(ti, ett_uhd); @@ -221,6 +221,7 @@ dissect_uhd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(uhd_tree, hf_uhd_echo_len, tvb, 12, 4, ENC_BIG_ENDIAN); break; } + return tvb_captured_length(tvb); } void @@ -289,7 +290,7 @@ proto_reg_handoff_uhd(void) static gint dissector_port; if (!uhd_prefs_initialized) { - uhd_handle = create_dissector_handle(dissect_uhd, proto_uhd); + uhd_handle = new_create_dissector_handle(dissect_uhd, proto_uhd); uhd_prefs_initialized = TRUE; } else { dissector_delete_uint("udp.port", dissector_port, uhd_handle); |