This enabling and disabling of autoconnect looks a bit complicated.
When the previous service is being disconnected, does the disconnection
go like this:
- src/service.c, 6132, err = service_connect(service);
- src/service.c, 6072, err = __connman_network_connect(service->network);
- src/network.c, 1446, __connman_device_disconnect(network->device);
- src/device.c, 645, __connman_network_disconnect(network);
So in this case it should be the plugin itself that needs to decide
whether and when another network needs to be disconnected? That way it
can keep the network connected until it finds the hidden network it is
With that the call to __connman_network_disconnect() could then be
removed, but needs to move into the plugins? Or only look out for
You bring up a very good point. The plugins or daemon for controlling
the connection start to get smarter. For example, iwd does all the
autoconnect on its own. That means we might have to rethink what happens
on a higher level.