When connecting a network, if it's related technology is disabled, this network
will raise an error through the agent. Leading to a possible retry request from
the user, then to a crash if the user does so.
Thus, we prevent any error to be raised in such situation and silently disconnect
the connecting network instead.
if (network->driver == NULL)
return;
- connman_network_set_connected(network, FALSE);
+ if (network->connected == TRUE)
+ set_disconnected(network);
switch (network->type) {
case CONNMAN_NETWORK_TYPE_UNKNOWN: