Restore interface selection after interface refresh
authorPeter Wu <peter@lekensteyn.nl>
Fri, 10 Mar 2017 02:46:53 +0000 (03:46 +0100)
committerAnders Broman <a.broman58@gmail.com>
Wed, 22 Mar 2017 05:03:27 +0000 (05:03 +0000)
commit40a5fb567a9bd1bb02d38ca33efe64392230d27d
treefdbef08b31adfff38e2fc69811d9ca639602497c
parent1f5c3044f920ef4cf9c345f81bd8a14bd7b4ffc9
Restore interface selection after interface refresh

Remember which interfaces were selected for the next capture and restore
the selection (note that only active capture devices are stored in
"ifaces", so simply querying that list does not work).

The original change tried to fix duplicate devices (which were added
from "ifaces" to "all_ifaces") by clearing "ifaces", this patch tries to
fix that by ignoring all non-PIPE devices while preserving "ifaces".

Now after refreshing the interfaces list in Qt, the selection in the
Manage Interfaces dialog is preserved. Removal of the bluetooth0
interface+refresh does hide the interface. Read+refresh does add the
interface (and preserve the selected state).

Change-Id: I26a78982f0327c835dc96da9c813e38f31d6cd3d
Fixes: v1.99.0-rc1-879-g55733ea170 ("fix scan_local_interfaces()")
Reviewed-on: https://code.wireshark.org/review/20477
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
ui/iface_lists.c