supplicant: Handle race condition on WiFi dongle removal
When a WiFi USB dongle is removed, both rtnl and wpa_supplicant will
be telling that the device is gone. While disconnecting and removing
an interface via gsupplicant, check that D-Bus doesn't give us an
error indicating the interface is already unregistered from D-Bus.
The gdb output looks like:
(gdb) where
#0 0x0042247c in network_connect (network=0x2) at plugins/wifi.c:1197
#1 0x004228f0 in disconnect_callback (result=<value optimized out>,
interface=0x0, user_data=0x99) at plugins/wifi.c:1254
#2 0x0042b910 in network_remove_result (error=0x4d5458
"org.freedesktop.DBus.Error.UnknownMethod", iter=<value optimized
out>,
user_data=<value optimized out>) at gsupplicant/supplicant.c:3593
#3 0x0042ede0 in method_call_reply (call=0x4c6fd0,
user_data=0x4d3be8) at gsupplicant/dbus.c:386
#4 0x2abfddb4 in complete_pending_call_and_unlock () from
/usr/lib/libdbus-1.so.3
Also don't call the same callback twice.