diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-14 09:23:33 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-14 21:54:27 +0000 |
commit | 28ea58251c04562cc0670e57bf073dc6966e73e6 (patch) | |
tree | abe57292f17b280056a73ee7cfdc94abdcaaaaf3 /epan/dissectors/packet-sua.c | |
parent | 13101020e12eb21e8464a3c4eb4fc2fe51409235 (diff) |
register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most.
This concludes a "first pass" over the dissector directory.
Change-Id: If5ce5484214be50fe541cba478da1de62e354297
Reviewed-on: https://code.wireshark.org/review/11830
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-sua.c')
-rw-r--r-- | epan/dissectors/packet-sua.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/epan/dissectors/packet-sua.c b/epan/dissectors/packet-sua.c index a82d168056..35164641fa 100644 --- a/epan/dissectors/packet-sua.c +++ b/epan/dissectors/packet-sua.c @@ -2272,8 +2272,8 @@ dissect_sua_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *sua_t } } -static void -dissect_sua(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_sua(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *sua_item; proto_tree *sua_tree; @@ -2292,19 +2292,13 @@ dissect_sua(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree) /* Clear entries in Info column on summary display */ col_clear(pinfo->cinfo, COL_INFO); - /* In the interest of speed, if "tree" is NULL, don't do any work not - necessary to generate protocol tree items. */ - if (tree) { - /* create the sua protocol tree */ - sua_item = proto_tree_add_item(tree, proto_sua, message_tvb, 0, -1, ENC_NA); - sua_tree = proto_item_add_subtree(sua_item, ett_sua); - } else { - sua_tree = NULL; - } + /* create the sua protocol tree */ + sua_item = proto_tree_add_item(tree, proto_sua, message_tvb, 0, -1, ENC_NA); + sua_tree = proto_item_add_subtree(sua_item, ett_sua); /* dissect the message */ dissect_sua_message(message_tvb, pinfo, sua_tree, tree); - + return tvb_captured_length(message_tvb); } /* Register the protocol with Wireshark */ @@ -2460,7 +2454,7 @@ proto_register_sua(void) /* Register the protocol name and description */ proto_sua = proto_register_protocol("SS7 SCCP-User Adaptation Layer", "SUA", "sua"); - register_dissector("sua", dissect_sua, proto_sua); + new_register_dissector("sua", dissect_sua, proto_sua); /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_sua, hf, array_length(hf)); |