From 74747489ac9b67a06a4f53e14de66c0842165136 Mon Sep 17 00:00:00 2001 From: Mikael Kanstrup Date: Mon, 30 Nov 2015 22:25:35 +0100 Subject: [PATCH] qt: Refresh local interface list only when interfaces added/removed Whenever data is received on the iface monitor socket the list of local network interfaces is refreshed. No check whether an interface is really added/removed is done. Changes to network interface options like promiscous mode flag generate traffic on the iface monitor socket that not necessarily mean an interface was brought up or down resulting in an unwanted refresh of local interfaces. When local interfaces are refreshed selected capture interface(s) get deselected. This in turn makes "Restart current capture" fail with a no capture interface selected error. Fixed by moving the refresh action from socket monitor callback to iface monitor callback where interface up/down status is known. Bug: 11834 Change-Id: Iffd39c3240049880b5a8311bc6484f3d1433f387 Reviewed-on: https://code.wireshark.org/review/12317 Reviewed-by: Guy Harris --- ui/qt/wireshark_application.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp index 40d069be67..7e683db130 100644 --- a/ui/qt/wireshark_application.cpp +++ b/ui/qt/wireshark_application.cpp @@ -820,7 +820,7 @@ iface_mon_event_cb(const char *iface, int up) * We've been told that there's a new interface or that an old * interface is gone; reload the local interface list. */ - scan_local_interfaces(main_window_update); + wsApp->refreshLocalInterfaces(); } } @@ -837,14 +837,6 @@ void WiresharkApplication::ifChangeEventsAvailable() * events are available, and call the callback for them. */ iface_mon_event(); - - /* - * Now emit a signal to indicate that the list changed, so that all - * places displaying the list will get updated. - * - * XXX - only if it *did* change. - */ - emit localInterfaceListChanged(); #endif }