Suppose there is Wi-Fi network X that is saved in connman. Consider
the following scenario:
1. Autoscan is started by connman.
2. Network X will be marked as unavailable as result of
3. Application issue connect to network X.
4. Connect to X starts and
interface_state(G_SUPPLICANT_STATE_AUTHENTICATING) is received.
5. As result of this stop_autoscan >
connman_device_set_scanning(false) > __connman_device_cleanup_networks
is issued that free_network X because it was marked as unavailable.
6. It leads to network_remove > __connman_service_remove_from_network
connman_service_unref_debug > __connman_service_disconnect >
Stack trace is at the end. Does this means that it is better to not
connect to a network during scan?
__connman_error_operation_aborted() at error.c:167 0x5555555a732c
__connman_error_failed() at error.c:57 0x5555555a700d
connman_dbus_reply_pending() at dbus.c:663 0x5555555e48a9
reply_pending() at service.c:3,761 0x5555555b98b0
__connman_service_disconnect() at service.c:6,446 0x5555555bed1d
connman_service_unref_debug() at service.c:4,972 0x5555555bc2e6
__connman_service_remove_from_network() at service.c:7,266 0x5555555c05f7
network_remove() at network.c:809 0x5555555ac2ee
__connman_network_set_device() at network.c:2,015 0x5555555ae65a
free_network() at device.c:398 0x5555555a9190
__connman_device_cleanup_networks() at device.c:721 0x5555555a9a33
connman_device_set_scanning() at device.c:778 0x5555555a9ba1
stop_autoscan() at wifi.c:861 0x5555555842d4
interface_state() at wifi.c:2,503 0x555555587a1c