diff options
author | Bill Meier <wmeier@newsguy.com> | 2008-11-04 21:42:02 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2008-11-04 21:42:02 +0000 |
commit | f35324d0fd73a8fbbfc922e91823ef6b3a1ae4ec (patch) | |
tree | a93ec5381270aa4229984585ea3ec7320ccdcf33 /asn1/x2ap | |
parent | a3d5cbf5d82252d097dc4e637fc218a491d30bc5 (diff) |
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
Diffstat (limited to 'asn1/x2ap')
-rw-r--r-- | asn1/x2ap/packet-x2ap-template.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/asn1/x2ap/packet-x2ap-template.c b/asn1/x2ap/packet-x2ap-template.c index 2aa236fc02..32e9b31c4c 100644 --- a/asn1/x2ap/packet-x2ap-template.c +++ b/asn1/x2ap/packet-x2ap-template.c @@ -56,8 +56,6 @@ #include "packet-x2ap-val.h" -static dissector_handle_t x2ap_handle = NULL; - /* Initialize the protocol and registered fields */ static int proto_x2ap = -1; @@ -157,7 +155,6 @@ void proto_register_x2ap(void) { /* Register dissector */ register_dissector("x2ap", dissect_x2ap, proto_x2ap); - x2ap_handle = find_dissector("x2ap"); /* Register dissector tables */ x2ap_ies_dissector_table = register_dissector_table("x2ap.ies", "X2AP-PROTOCOL-IES", FT_UINT32, BASE_DEC); @@ -173,7 +170,9 @@ void proto_register_x2ap(void) { void proto_reg_handoff_x2ap(void) { + dissector_handle_t x2ap_handle; + x2ap_handle = find_dissector("x2ap"); dissector_add("sctp.port", 0, x2ap_handle); #include "packet-x2ap-dis-tab.c" |