aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extcap.c10
-rw-r--r--extcap.h3
-rw-r--r--ui/qt/extcap_argument.cpp4
-rw-r--r--ui/qt/extcap_options_dialog.cpp3
4 files changed, 1 insertions, 19 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
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);
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);
}
}