diff options
author | Michael Mann <mmann78@netscape.net> | 2017-01-28 19:53:36 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-01-29 13:29:04 +0000 |
commit | af54b292e60fcdd8d03ec583e2b46c9c51f259a5 (patch) | |
tree | 67a4b61fd3e71ada67f2c27092a6849424759263 /epan/dissectors/packet-tds.c | |
parent | ed8ac81497c890bc82f161be727c0bb5285dcf12 (diff) | |
download | wireshark-af54b292e60fcdd8d03ec583e2b46c9c51f259a5.tar.gz |
Register reassembly tables
Register all reassembly tables with a central unit, allowing the
central unit to have the callback that initializes and destroys
the reassembly tables, rather than have dissectors do it individually.
Change-Id: Ic92619c06fb5ba6f1c3012f613cae14982e101d4
Reviewed-on: https://code.wireshark.org/review/19834
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-tds.c')
-rw-r--r-- | epan/dissectors/packet-tds.c | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/epan/dissectors/packet-tds.c b/epan/dissectors/packet-tds.c index 7e92309b77..b51e51849d 100644 --- a/epan/dissectors/packet-tds.c +++ b/epan/dissectors/packet-tds.c @@ -4188,26 +4188,6 @@ dissect_tds_tcp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * } static void -tds_init(void) -{ - /* - * Initialize the reassembly table. - * - * XXX - should fragments be reassembled across multiple TCP - * connections? - */ - - reassembly_table_init(&tds_reassembly_table, - &addresses_ports_reassembly_table_functions); -} - -static void -tds_cleanup(void) -{ - reassembly_table_destroy(&tds_reassembly_table); -} - -static void version_convert( gchar *result, guint32 hexver ) { g_snprintf( result, ITEM_LABEL_LENGTH, "%d.%d.%d.%d", @@ -5620,8 +5600,15 @@ proto_register_tds(void) "Hint as to whether to decode TDS protocol as little-endian or big-endian. (TDS7/8 always decoded as little-endian)", &tds_little_endian, tds_endian_type_options, FALSE); - register_init_routine(tds_init); - register_cleanup_routine(tds_cleanup); + /* + * Initialize the reassembly table. + * + * XXX - should fragments be reassembled across multiple TCP + * connections? + */ + + reassembly_table_register(&tds_reassembly_table, + &addresses_ports_reassembly_table_functions); } /* If this dissector uses sub-dissector registration add a registration routine. |