From c199952f5c66c61d908c5052de9172fe11a3f260 Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Wed, 30 Aug 2017 15:24:49 +0200 Subject: extcap: fix parameters save in preferences file Since g583150198b, extcap_arg structures holds a pointer to the current preference value. So let's not update its value outside of the prefs API otherwise the call to prefs_set_string_value() with pref_current done afterwards will never notify the change and the updated value will not be written in the preference file. Moreover update ExtcapArgument::resetValue() method to have an empty string instead of a NULL pointer. Otherwise prefs_set_string_value() will not notify the change and save the restored default value in the preference file either. Change-Id: Ie70e79d471c75e25705c7654e420a7706ebc4032 Reviewed-on: https://code.wireshark.org/review/23308 Petri-Dish: Pascal Quantin Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo Reviewed-by: Anders Broman --- extcap.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'extcap.h') diff --git a/extcap.h b/extcap.h index 013ccdb4fd..ac8993a2c0 100644 --- a/extcap.h +++ b/extcap.h @@ -152,9 +152,6 @@ extcap_if_cleanup(capture_options * capture_opts, gchar ** errormsg); struct preference * extcap_pref_for_argument(const gchar *ifname, struct _extcap_arg * arg); -void -extcap_pref_store(struct _extcap_arg * arg, const char * newval); - /* Clean up global extcap stuff on program exit */ void extcap_cleanup(void); -- cgit v1.2.3