From af54b292e60fcdd8d03ec583e2b46c9c51f259a5 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sat, 28 Jan 2017 19:53:36 -0500 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-smb-direct.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'epan/dissectors/packet-smb-direct.c') diff --git a/epan/dissectors/packet-smb-direct.c b/epan/dissectors/packet-smb-direct.c index 29ccbdd9d6..e12636fd0a 100644 --- a/epan/dissectors/packet-smb-direct.c +++ b/epan/dissectors/packet-smb-direct.c @@ -106,19 +106,6 @@ static heur_dissector_list_t smb_direct_heur_subdissector_list; static gboolean smb_direct_reassemble = TRUE; static reassembly_table smb_direct_reassembly_table; -static void -smb_direct_reassemble_init(void) -{ - reassembly_table_init(&smb_direct_reassembly_table, - &addresses_ports_reassembly_table_functions); -} - -static void -smb_direct_reassemble_cleanup(void) -{ - reassembly_table_destroy(&smb_direct_reassembly_table); -} - static void dissect_smb_direct_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 remaining_length) @@ -699,8 +686,8 @@ void proto_register_smb_direct(void) "Reassemble SMB Direct fragments", "Whether the SMB Direct dissector should reassemble fragmented payloads", &smb_direct_reassemble); - register_init_routine(smb_direct_reassemble_init); - register_cleanup_routine(smb_direct_reassemble_cleanup); + reassembly_table_register(&smb_direct_reassembly_table, + &addresses_ports_reassembly_table_functions); } void -- cgit v1.2.3