aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cbor.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-09 23:01:28 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-13 17:44:24 +0000
commit01f7356f85d33567a25e722e6488addd72ff64d4 (patch)
tree2d8623b57706cc924f76293f0f5b6ce8d83124ab /epan/dissectors/packet-cbor.c
parentb776707af540d7431e815818e21ea1efac326d9f (diff)
register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I3d5e576b796556ef070bb36d8b55da0b175dcba8 Reviewed-on: https://code.wireshark.org/review/11805 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-cbor.c')
-rw-r--r--epan/dissectors/packet-cbor.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-cbor.c b/epan/dissectors/packet-cbor.c
index 80b674ca76..a8d95ecbec 100644
--- a/epan/dissectors/packet-cbor.c
+++ b/epan/dissectors/packet-cbor.c
@@ -696,8 +696,8 @@ dissect_cbor_main_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *cbor_tree,
return NULL;
}
-static void
-dissect_cbor(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
+static int
+dissect_cbor(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_)
{
gint offset = 0;
proto_item *cbor_root;
@@ -706,6 +706,8 @@ dissect_cbor(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
cbor_root = proto_tree_add_item(parent_tree, proto_cbor, tvb, offset, -1, ENC_NA);
cbor_tree = proto_item_add_subtree(cbor_root, ett_cbor);
dissect_cbor_main_type(tvb, pinfo, cbor_tree, &offset);
+
+ return tvb_captured_length(tvb);
}
void
@@ -851,7 +853,7 @@ proto_register_cbor(void)
expert_cbor = expert_register_protocol(proto_cbor);
expert_register_field_array(expert_cbor, ei, array_length(ei));
- register_dissector("cbor", dissect_cbor, proto_cbor);
+ new_register_dissector("cbor", dissect_cbor, proto_cbor);
}
void
@@ -859,7 +861,7 @@ proto_reg_handoff_cbor(void)
{
static dissector_handle_t cbor_handle;
- cbor_handle = create_dissector_handle(dissect_cbor, proto_cbor);
+ cbor_handle = new_create_dissector_handle(dissect_cbor, proto_cbor);
dissector_add_string("media_type", "application/cbor", cbor_handle); /* RFC 7049 */
}