diff options
-rw-r--r-- | extcap.c | 10 | ||||
-rw-r--r-- | extcap.h | 3 | ||||
-rw-r--r-- | ui/qt/extcap_argument.cpp | 4 | ||||
-rw-r--r-- | ui/qt/extcap_options_dialog.cpp | 3 |
4 files changed, 1 insertions, 19 deletions
@@ -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 @@ -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); diff --git a/ui/qt/extcap_argument.cpp b/ui/qt/extcap_argument.cpp index 6a74cc7e07..3e21a36fba 100644 --- a/ui/qt/extcap_argument.cpp +++ b/ui/qt/extcap_argument.cpp @@ -662,11 +662,9 @@ QString ExtcapArgument::prefValue() void ExtcapArgument::resetValue() { - // XXX consider using the preferences API which can store the default value - // and put that here instead of an empty value. if (_argument->pref_valptr) { g_free(*_argument->pref_valptr); - *_argument->pref_valptr = NULL; + *_argument->pref_valptr = g_strdup(""); } } diff --git a/ui/qt/extcap_options_dialog.cpp b/ui/qt/extcap_options_dialog.cpp index c70f5531bb..946007df58 100644 --- a/ui/qt/extcap_options_dialog.cpp +++ b/ui/qt/extcap_options_dialog.cpp @@ -494,9 +494,6 @@ void ExtcapOptionsDialog::storeValues() { gchar * val = g_strdup(value.length() == 0 ? " " : value.toStdString().c_str()); - /* Setting the internally stored value for the preference to the new value */ - extcap_pref_store((*iter)->argument(), val); - g_hash_table_insert(entries, g_strdup(key.toStdString().c_str()), val); } } |