3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-17 17:39:28 +01:00

netdev: Clear connect_cb when connected

Prevents situations like this:
src/device.c:device_enter_state() Old State: connecting, new state:
connected
src/scan.c:scan_periodic_stop() Stopping periodic scan for ifindex: 3
src/device.c:device_dbus_disconnect()
src/device.c:device_connect_cb() 3
src/device.c:device_disassociated() 3
src/device.c:device_enter_state() Old State: connected, new state:
autoconnect
This commit is contained in:
Denis Kenzior 2016-08-04 10:46:41 -05:00
parent cec2104ffa
commit 8248c1c7d2

View File

@ -532,8 +532,10 @@ static void netdev_operstate_cb(bool success, void *user_data)
return;
}
if (netdev->connect_cb)
if (netdev->connect_cb) {
netdev->connect_cb(netdev, NETDEV_RESULT_OK, netdev->user_data);
netdev->connect_cb = NULL;
}
}
static void netdev_setting_keys_failed(struct netdev *netdev,