Wireshark-commits: [Wireshark-commits] master 3243b6f: asn1: split off cleanup routines
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 4 Jul 2015 00:17:23 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=3243b6f964c96f0137fc3fffd66a74dd9f7910fd Submitter: Michael Mann (mmann78@xxxxxxxxxxxx) Changed: branch: master Repository: wireshark Commits: 3243b6f by Peter Wu (peter@xxxxxxxxxxxxx): asn1: split off cleanup routines General approach: 1. Split allocation (e.g. g_hash_table_new) from deallocation (g_hash_table_destroy) into functions named "init" and "cleanup". 2. Remove guards that test whether the hash tables are set as init is always called before cleanup. 3. Remove setting hash tables to NULL after destruction. 4. Copy register_init_routine function call and change init to cleanup. 5. Add cleanup function that calls reassembly_table_destroy if there is a reassembly_table_init function. Some templates were modified as follows: - snmp: split renew into init+cleanup, but keep renew for the uat_new callback. - ldap,ros: Rename init to cleanup as there was no initialization. - camel: remove init function from header, make it static. Remove debug print. - tcap: remove unused ssn_range assignment. Files in epan/ were regenerated using cmake && make asn1 Change-Id: Idac16ebf0ec304e0c8becaab5d32904e56eb69b9 Reviewed-on: https://code.wireshark.org/review/9136 Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx> Actions performed: from 7b33634 plugins: add cleanup routines adds 3243b6f asn1: split off cleanup routines Summary of changes: asn1/ansi_map/packet-ansi_map-template.c | 17 +++++----- asn1/ansi_tcap/packet-ansi_tcap-template.c | 19 +++++------ asn1/camel/packet-camel-template.c | 22 ++++++------- asn1/camel/packet-camel-template.h | 6 ---- asn1/h225/packet-h225-template.c | 21 +++++++------ asn1/h245/packet-h245-template.c | 8 +++-- asn1/idmp/packet-idmp-template.c | 5 +++ asn1/ldap/packet-ldap-template.c | 4 +-- asn1/lte-rrc/packet-lte-rrc-template.c | 15 ++++----- asn1/nbap/packet-nbap-template.c | 25 ++++++++------- asn1/pres/packet-pres-template.c | 11 ++++--- asn1/ros/packet-ros-template.c | 4 +-- asn1/rrc/packet-rrc-template.c | 19 ++++++----- asn1/rtse/packet-rtse-template.c | 6 ++++ asn1/snmp/packet-snmp-template.c | 41 +++++++++++++++--------- asn1/t38/packet-t38-template.c | 6 ++++ asn1/tcap/packet-tcap-template.c | 14 +++++---- epan/dissectors/packet-ansi_map.c | 23 ++++++-------- epan/dissectors/packet-ansi_tcap.c | 26 +++++++-------- epan/dissectors/packet-camel.c | 28 +++++++---------- epan/dissectors/packet-camel.h | 6 ---- epan/dissectors/packet-h225.c | 26 ++++++++------- epan/dissectors/packet-h245.c | 18 ++++++----- epan/dissectors/packet-idmp.c | 9 ++++-- epan/dissectors/packet-ldap.c | 4 +-- epan/dissectors/packet-lte-rrc.c | 15 ++++----- epan/dissectors/packet-nbap.c | 27 ++++++++-------- epan/dissectors/packet-pres.c | 17 +++++----- epan/dissectors/packet-ros.c | 4 +-- epan/dissectors/packet-rrc.c | 25 ++++++++------- epan/dissectors/packet-rtse.c | 10 ++++-- epan/dissectors/packet-snmp.c | 47 +++++++++++++++++----------- epan/dissectors/packet-t38.c | 12 +++++-- epan/dissectors/packet-tcap.c | 18 ++++++----- 34 files changed, 307 insertions(+), 251 deletions(-)
- Prev by Date: [Wireshark-commits] master 7b33634: plugins: add cleanup routines
- Next by Date: [Wireshark-commits] buildbot failure in Wireshark (development) on Ubuntu 14.04 x64
- Previous by thread: [Wireshark-commits] master 7b33634: plugins: add cleanup routines
- Next by thread: [Wireshark-commits] master c60b8ea: ansi_map: fix float literals missing f suffix
- Index(es):