aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/gtk/capture_dlg.c6
-rw-r--r--ui/gtk/gtk_iface_monitor.c14
-rw-r--r--ui/iface_lists.c4
3 files changed, 17 insertions, 7 deletions
diff --git a/ui/gtk/capture_dlg.c b/ui/gtk/capture_dlg.c
index dea2b1781a..6e2756a01a 100644
--- a/ui/gtk/capture_dlg.c
+++ b/ui/gtk/capture_dlg.c
@@ -3768,7 +3768,8 @@ capture_dlg_refresh_if (void)
{
GtkTreeView *view;
- fill_local_list();
+ if (interface_management_w)
+ fill_local_list();
view = (GtkTreeView *) g_object_get_data(G_OBJECT(cap_open_w), E_CAP_IFACE_KEY);
create_and_fill_model(GTK_TREE_VIEW(view));
@@ -6014,8 +6015,7 @@ void
refresh_local_interface_lists(void)
{
/* Reload the local interface list. */
- if (global_capture_opts.session_started == FALSE)
- scan_local_interfaces();
+ scan_local_interfaces();
/* If there's an interfaces dialog up, refresh it. */
if (interfaces_dialog_window_present())
diff --git a/ui/gtk/gtk_iface_monitor.c b/ui/gtk/gtk_iface_monitor.c
index f3797247f8..b38c761b98 100644
--- a/ui/gtk/gtk_iface_monitor.c
+++ b/ui/gtk/gtk_iface_monitor.c
@@ -45,13 +45,23 @@ static void
gtk_iface_mon_event_cb(const char *iface, int up)
{
int present = 0;
- guint ifs;
+ guint ifs, j;
interface_t device;
+ interface_options interface_opts;
for (ifs = 0; ifs < global_capture_opts.all_ifaces->len; ifs++) {
device = g_array_index(global_capture_opts.all_ifaces, interface_t, ifs);
- if (!strcmp(device.name, iface))
+ if (!strcmp(device.name, iface)) {
present = 1;
+ if (!up) {
+ for (j = 0; j < global_capture_opts.ifaces->len; j++) {
+ interface_opts = g_array_index(global_capture_opts.ifaces, interface_options, j);
+ if (strcmp(interface_opts.name, device.name) == 0) {
+ g_array_remove_index(global_capture_opts.ifaces, j);
+ }
+ }
+ }
+ }
}
if (present == up)
diff --git a/ui/iface_lists.c b/ui/iface_lists.c
index f19b345e6a..944026f686 100644
--- a/ui/iface_lists.c
+++ b/ui/iface_lists.c
@@ -88,7 +88,7 @@ scan_local_interfaces(void)
if (global_capture_opts.all_ifaces->len > 0) {
for (i = (int)global_capture_opts.all_ifaces->len-1; i >= 0; i--) {
device = g_array_index(global_capture_opts.all_ifaces, interface_t, i);
- if (device.local) {
+ if (device.local && device.type != IF_PIPE && device.type != IF_STDIN) {
global_capture_opts.all_ifaces = g_array_remove_index(global_capture_opts.all_ifaces, i);
}
}
@@ -306,7 +306,7 @@ scan_local_interfaces(void)
}
if (!found) { /* new interface, maybe a pipe */
device.name = g_strdup(interface_opts.name);
- device.display_name = g_strdup_printf("%s", device.name);
+ device.display_name = g_strdup_printf("%s: %s", interface_opts.descr);
device.hidden = FALSE;
device.selected = TRUE;
device.type = IF_PIPE;