From f35324d0fd73a8fbbfc922e91823ef6b3a1ae4ec Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Tue, 4 Nov 2008 21:42:02 +0000 Subject: Minor cleanup mostly related to proto_reg_handoff Remove code for unused handles; Localize handles (in proto_reg_handoff) which need not be global; Localize (in proto_reg_handoff) "saved prefs"; Use find_dissector instead of create_dissector_handle as appropriate; Use gboolean for "initialized" flag in proto_reg_handoff. svn path=/trunk/; revision=26693 --- asn1/h245/packet-h245-template.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'asn1/h245') diff --git a/asn1/h245/packet-h245-template.c b/asn1/h245/packet-h245-template.c index 4f366c90db..f10aee757c 100644 --- a/asn1/h245/packet-h245-template.c +++ b/asn1/h245/packet-h245-template.c @@ -71,7 +71,6 @@ static dissector_table_t gef_name_dissector_table; static dissector_table_t gef_content_dissector_table; static dissector_handle_t nsp_handle; static dissector_handle_t data_handle; -static dissector_handle_t h245_handle; static dissector_handle_t MultimediaSystemControlMessage_handle; static dissector_handle_t h263_handle = NULL; static dissector_handle_t amr_handle = NULL; @@ -554,6 +553,8 @@ void proto_register_h245(void) { /*--- proto_reg_handoff_h245 ---------------------------------------*/ void proto_reg_handoff_h245(void) { + dissector_handle_t h245_handle; + rtp_handle = find_dissector("rtp"); rtcp_handle = find_dissector("rtcp"); t38_handle = find_dissector("t38"); @@ -562,9 +563,9 @@ void proto_reg_handoff_h245(void) { amr_handle = find_dissector("amr_if2_nb"); - h245_handle=create_dissector_handle(dissect_h245, proto_h245); + h245_handle = find_dissector("h245"); dissector_add_handle("tcp.port", h245_handle); - MultimediaSystemControlMessage_handle=create_dissector_handle(dissect_h245_h245, proto_h245); + MultimediaSystemControlMessage_handle = find_dissector("h245dg"); dissector_add_handle("udp.port", MultimediaSystemControlMessage_handle); } -- cgit v1.2.3