diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-08 19:30:18 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-09 15:59:59 +0000 |
commit | 2fe0fc5a1afbbd8218190736decbecec14582691 (patch) | |
tree | a5d7860915c351039bbb16979f0a05532533a276 /epan/dissectors/packet-coap.c | |
parent | 0aa9e9864721d5f425ffeba85bbb642ebd12e771 (diff) |
Convert some TCP subdissectors to "new" style.
Change-Id: I28ce51f3c06f78b85792bce4a13ef39eb75d7890
Reviewed-on: https://code.wireshark.org/review/11648
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-coap.c')
-rw-r--r-- | epan/dissectors/packet-coap.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-coap.c b/epan/dissectors/packet-coap.c index 1ade51a991..5521749913 100644 --- a/epan/dissectors/packet-coap.c +++ b/epan/dissectors/packet-coap.c @@ -784,8 +784,8 @@ dissect_coap_options(tvbuff_t *tvb, packet_info *pinfo, proto_tree *coap_tree, g return offset; } -static void -dissect_coap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_coap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { gint offset = 0; proto_item *coap_root; @@ -862,7 +862,7 @@ dissect_coap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) /* process options */ offset = dissect_coap_options(tvb, pinfo, coap_tree, offset, coap_length); if (offset == -1) - return; + return tvb_captured_length(tvb); /* add informations to the packet list */ if (coap_token_str != NULL) @@ -919,6 +919,8 @@ dissect_coap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) dissector_try_string(media_type_dissector_table, coap_ctype_str_dis, payload_tvb, pinfo, payload_tree, NULL); } + + return tvb_captured_length(tvb); } /* @@ -1124,7 +1126,7 @@ proto_register_coap(void) expert_coap = expert_register_protocol(proto_coap); expert_register_field_array(expert_coap, ei, array_length(ei)); - register_dissector("coap", dissect_coap, proto_coap); + new_register_dissector("coap", dissect_coap, proto_coap); /* Register our configuration options */ coap_module = prefs_register_protocol (proto_coap, proto_reg_handoff_coap); |