diff options
author | Bill Meier <wmeier@newsguy.com> | 2008-11-04 22:01:35 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2008-11-04 22:01:35 +0000 |
commit | 017f36d61bd8f72f3eb06f962245385dc0a5ed38 (patch) | |
tree | 285f9e57641612fd7549f040ef082a42a7c34c26 /asn1/sabp | |
parent | 92a9b695a49890ba962794753669551a2871ac3f (diff) | |
download | wireshark-017f36d61bd8f72f3eb06f962245385dc0a5ed38.tar.gz wireshark-017f36d61bd8f72f3eb06f962245385dc0a5ed38.tar.bz2 wireshark-017f36d61bd8f72f3eb06f962245385dc0a5ed38.zip |
Minor cleanup mostly related to proto_reg_handoff
Remove code for unused handles;
Localize handles to proto_reg_handoff as appropriate;
Localize "saved_prefs" to proto_reg_handoff;
In some cases: move "once-only" code in proto_reg_handoff
so that it's executed only the first time thru
proto_reg_handoff;
Properly delete/add port when pref changed (packet_ulp);
svn path=/trunk/; revision=26697
Diffstat (limited to 'asn1/sabp')
-rw-r--r-- | asn1/sabp/packet-sabp-template.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/asn1/sabp/packet-sabp-template.c b/asn1/sabp/packet-sabp-template.c index c70e4eb8b9..5fcca687e2 100644 --- a/asn1/sabp/packet-sabp-template.c +++ b/asn1/sabp/packet-sabp-template.c @@ -56,9 +56,6 @@ #include "packet-sabp-val.h" -static dissector_handle_t sabp_handle = NULL; -static dissector_handle_t sabp_tcp_handle = NULL; - /* Initialize the protocol and registered fields */ static int proto_sabp = -1; @@ -200,8 +197,6 @@ void proto_register_sabp(void) { /* Register dissector */ register_dissector("sabp", dissect_sabp, proto_sabp); register_dissector("sabp.tcp", dissect_sabp_tcp, proto_sabp); - sabp_handle = find_dissector("sabp"); - sabp_tcp_handle = find_dissector("sabp.tcp"); /* Register dissector tables */ sabp_ies_dissector_table = register_dissector_table("sabp.ies", "SABP-PROTOCOL-IES", FT_UINT32, BASE_DEC); @@ -217,14 +212,16 @@ void proto_register_sabp(void) { void proto_reg_handoff_sabp(void) { + dissector_handle_t sabp_handle; + dissector_handle_t sabp_tcp_handle; + sabp_handle = find_dissector("sabp"); + sabp_tcp_handle = find_dissector("sabp.tcp"); + dissector_add("udp.port", 3452, sabp_handle); + dissector_add("tcp.port", 3452, sabp_tcp_handle); #include "packet-sabp-dis-tab.c" - sabp_handle = find_dissector("sabp"); - dissector_add("tcp.port", 3452, sabp_tcp_handle); - dissector_add("udp.port", 3452, sabp_handle); - dissector_add_handle("tcp.port", sabp_tcp_handle); } |