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:
parent
e7e6326179
commit
a16abfdc92
@ -148,7 +148,10 @@ bool network_connected(struct network *network)
|
||||
return false;
|
||||
|
||||
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
|
||||
* 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,
|
||||
network->settings);
|
||||
} else
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
err = storage_network_get_mtime(strtype, network->info->ssid,
|
||||
&network->info->connected_time);
|
||||
|
Loading…
Reference in New Issue
Block a user