diff options
author | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-01-13 21:09:03 +0000 |
---|---|---|
committer | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-01-13 21:09:03 +0000 |
commit | 0e00e4e760708c9b3e544814aa6d701c1e6e4a55 (patch) | |
tree | ed7384edcd5b81ea36635693f17a39bd65cd14a8 /epan/dissectors | |
parent | 0ccc13c78e659fa9da0cbad3d582fc63e3ed1bda (diff) |
Minor changes related to reg_handoff_ & proto_register_
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27225 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-evrc.c | 25 | ||||
-rw-r--r-- | epan/dissectors/packet-sflow.c | 9 | ||||
-rw-r--r-- | epan/dissectors/packet-tte-pcf.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-tte.c | 2 |
4 files changed, 20 insertions, 22 deletions
diff --git a/epan/dissectors/packet-evrc.c b/epan/dissectors/packet-evrc.c index e8eb8764dc..0102a3573d 100644 --- a/epan/dissectors/packet-evrc.c +++ b/epan/dissectors/packet-evrc.c @@ -154,10 +154,6 @@ static int hf_evrc_legacy_toc_frame_type = -1; static gint ett_evrc = -1; static gint ett_toc = -1; -static dissector_handle_t evrc_handle; -static dissector_handle_t evrcb_handle; -static dissector_handle_t evrcwb_handle; -static dissector_handle_t evrc_legacy_handle; static packet_info *g_pinfo; static proto_tree *g_tree; @@ -507,15 +503,24 @@ void proto_reg_handoff_evrc(void) { static gboolean evrc_prefs_initialized = FALSE; - + static dissector_handle_t evrc_legacy_handle; if (!evrc_prefs_initialized) { - evrc_handle = create_dissector_handle(dissect_evrc, proto_evrc); - evrcb_handle = create_dissector_handle(dissect_evrcb, proto_evrc); - evrcwb_handle = create_dissector_handle(dissect_evrcwb, proto_evrc); + dissector_handle_t evrc_handle; + dissector_handle_t evrcb_handle; + dissector_handle_t evrcwb_handle; + + evrc_handle = create_dissector_handle(dissect_evrc, proto_evrc); + evrcb_handle = create_dissector_handle(dissect_evrcb, proto_evrc); + evrcwb_handle = create_dissector_handle(dissect_evrcwb, proto_evrc); evrc_legacy_handle = create_dissector_handle(dissect_evrc_legacy, proto_evrc); + /* header-full mime types */ + dissector_add_string("rtp_dyn_payload_type", "EVRC", evrc_handle); + dissector_add_string("rtp_dyn_payload_type", "EVRCB", evrcb_handle); + dissector_add_string("rtp_dyn_payload_type", "EVRCWB", evrcwb_handle); + evrc_prefs_initialized = TRUE; } else @@ -528,8 +533,4 @@ proto_reg_handoff_evrc(void) dissector_add("rtp.pt", 60, evrc_legacy_handle); } - /* header-full mime types */ - dissector_add_string("rtp_dyn_payload_type", "EVRC", evrc_handle); - dissector_add_string("rtp_dyn_payload_type", "EVRCB", evrcb_handle); - dissector_add_string("rtp_dyn_payload_type", "EVRCWB", evrcwb_handle); } diff --git a/epan/dissectors/packet-sflow.c b/epan/dissectors/packet-sflow.c index d8f10174c5..0e65f97585 100644 --- a/epan/dissectors/packet-sflow.c +++ b/epan/dissectors/packet-sflow.c @@ -64,10 +64,6 @@ static dissector_handle_t sflow_handle; */ static range_t *global_sflow_ports = NULL; -/* - * sflow_ports : holds the currently used range of ports for sflow - */ -static range_t *sflow_ports = NULL; static gboolean global_dissect_samp_headers = TRUE; static gboolean global_analyze_samp_ip_headers = FALSE; @@ -1473,6 +1469,11 @@ sflow_add_callback(guint32 port) static void sflow_reinit(void) { + /* + * sflow_ports : holds the currently used range of ports for sflow + */ + static range_t *sflow_ports = NULL; + if (sflow_ports) { range_foreach(sflow_ports, sflow_delete_callback); g_free(sflow_ports); diff --git a/epan/dissectors/packet-tte-pcf.c b/epan/dissectors/packet-tte-pcf.c index d2832daef7..950549b373 100644 --- a/epan/dissectors/packet-tte-pcf.c +++ b/epan/dissectors/packet-tte-pcf.c @@ -41,10 +41,6 @@ #include "packet-tte.h" - -/* Forward declaration we need below */ -void proto_reg_handoff_tte_pcf(void); - /* Initialize the protocol and registered fields */ static int proto_tte_pcf = -1; @@ -218,7 +214,7 @@ proto_reg_handoff_tte_pcf(void) dissector_handle_t tte_pcf_handle; /* initialize the pcf handle */ - tte_pcf_handle = create_dissector_handle(dissect_tte_pcf, proto_tte_pcf); + tte_pcf_handle = find_dissector("tte_pcf"); dissector_add("ethertype", ETHERTYPE_TTE_PCF, tte_pcf_handle); diff --git a/epan/dissectors/packet-tte.c b/epan/dissectors/packet-tte.c index 2c29a454a5..83589c4919 100644 --- a/epan/dissectors/packet-tte.c +++ b/epan/dissectors/packet-tte.c @@ -191,7 +191,7 @@ proto_register_tte(void) proto_register_subtree_array(ett, array_length(ett)); /* Register preferences module */ - tte_module = prefs_register_protocol(proto_tte, proto_reg_handoff_tte); + tte_module = prefs_register_protocol(proto_tte, NULL); /* Register preferences */ prefs_register_uint_preference(tte_module, "ct_mask_value", |