aboutsummaryrefslogtreecommitdiffstats
path: root/extcap.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2017-08-30 15:24:49 +0200
committerAnders Broman <a.broman58@gmail.com>2017-08-31 04:34:39 +0000
commitc199952f5c66c61d908c5052de9172fe11a3f260 (patch)
tree6daea82e74661f672aa5af035e2ce65c27afe2d9 /extcap.c
parent51789050633fc4554413a6f79439c9162c1c8cfb (diff)
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 <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'extcap.c')
-rw-r--r--extcap.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/extcap.c b/extcap.c
index 53bead8dd5..6bed5c4583 100644
--- a/extcap.c
+++ b/extcap.c
@@ -605,16 +605,6 @@ void extcap_cleanup(void)
g_hash_table_destroy(_tool_for_ifname);
}
-void extcap_pref_store(extcap_arg *arg, const char *newval)
-{
- if (arg && arg->pref_valptr != NULL)
- {
- g_free(*arg->pref_valptr);
- *arg->pref_valptr = g_strdup(newval);
- }
-
-}
-
/**
* Obtains a pointer which can store a value for the given preference name.
* The preference name that can be passed to the prefs API is stored into