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;
|
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);
|
||||||
|
|
Loading…
Reference in New Issue