From fb9a356e46c5adbc74e9d117463c0fb2b4778afe Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Thu, 17 Nov 2016 21:45:28 -0500 Subject: Add prefs_get_uint_value and prefs_get_range_value This allows dissectors to not need to know about the internal preference structure. Change-Id: I1ae67248cd0b0132aefc225ea0a9befaf9afdde2 Reviewed-on: https://code.wireshark.org/review/18864 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-capwap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'epan/dissectors/packet-capwap.c') diff --git a/epan/dissectors/packet-capwap.c b/epan/dissectors/packet-capwap.c index c2e3cadedc..48fdf5ab62 100644 --- a/epan/dissectors/packet-capwap.c +++ b/epan/dissectors/packet-capwap.c @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -3398,8 +3397,7 @@ dissect_capwap_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d static void apply_capwap_prefs(void) { - pref_t *control_port = prefs_find_preference(prefs_find_module("capwap.data"), "udp.port"); - global_capwap_data_udp_port = *control_port->varp.uint; + global_capwap_data_udp_port = prefs_get_uint_value("capwap.data", "udp.port"); } void -- cgit v1.2.3