aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/sabp
diff options
context:
space:
mode:
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2008-11-04 22:01:35 +0000
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2008-11-04 22:01:35 +0000
commita0945d912259734cecf18a0523c348882b8881b8 (patch)
tree285f9e57641612fd7549f040ef082a42a7c34c26 /asn1/sabp
parent6d2fef79495f49cc3ebf3b1fe97554a212ebad40 (diff)
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); git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26697 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'asn1/sabp')
-rw-r--r--asn1/sabp/packet-sabp-template.c15
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);
}