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-opensafety.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'epan/dissectors/packet-opensafety.c') diff --git a/epan/dissectors/packet-opensafety.c b/epan/dissectors/packet-opensafety.c index e60972d47f..65b410a38c 100644 --- a/epan/dissectors/packet-opensafety.c +++ b/epan/dissectors/packet-opensafety.c @@ -297,8 +297,6 @@ setup_dissector(void) { heur_dtbl_entry_t * heur_entry = NULL; - reassembly_table_init(&os_reassembly_table, &addresses_reassembly_table_functions); - heur_entry = find_heur_dissector_by_unique_short_name("opensafety_sercosiii"); if ( heur_entry != NULL ) heuristic_siii_dissection_enabled = heur_entry->enabled; @@ -308,7 +306,6 @@ static void cleanup_dissector(void) { local_scm_udid = NULL; - reassembly_table_destroy(&os_reassembly_table); } void proto_register_opensafety(void); @@ -2897,6 +2894,8 @@ proto_reg_handoff_opensafety(void) register_init_routine ( setup_dissector ); register_cleanup_routine ( cleanup_dissector ); + reassembly_table_register(&os_reassembly_table, &addresses_reassembly_table_functions); + /* registering frame end routine, to prevent a malformed dissection preventing * further dissector calls (see bug #6950) */ /* register_frame_end_routine(reset_dissector); */ -- cgit v1.2.3