3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

network: Don't fail if network config file exists

This commit is contained in:
Denis Kenzior 2016-10-10 15:59:36 -05:00
parent e7e6326179
commit a16abfdc92

View File

@ -148,7 +148,10 @@ bool network_connected(struct network *network)
return false; return false;
err = storage_network_touch(strtype, network->info->ssid); err = storage_network_touch(strtype, network->info->ssid);
if (err == -ENOENT) { switch (err) {
case 0:
break;
case -ENOENT:
/* /*
* Write an empty settings file to keep track of the * Write an empty settings file to keep track of the
* last connected time. This will also make iwd autoconnect * last connected time. This will also make iwd autoconnect
@ -159,8 +162,10 @@ bool network_connected(struct network *network)
storage_network_sync(strtype, network->info->ssid, storage_network_sync(strtype, network->info->ssid,
network->settings); network->settings);
} else break;
default:
return false; return false;
}
err = storage_network_get_mtime(strtype, network->info->ssid, err = storage_network_get_mtime(strtype, network->info->ssid,
&network->info->connected_time); &network->info->connected_time);