3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

storage: Log a message on network file parse errors

Most users of storage_network_open don't log errors when the function
returns a NULL and fall back to defaults (empty l_settings).
storage_network_open() itself only logs errors if the flie is encrypted.
Now also log an error when l_settings_load_from_file() fails to help track
down potential syntax errors.
This commit is contained in:
Andrew Zaborowski 2022-06-16 02:02:18 +02:00 committed by Denis Kenzior
parent ba1253df3b
commit e88a0757ab

View File

@ -597,8 +597,10 @@ struct l_settings *storage_network_open(enum security type, const char *ssid)
settings = l_settings_new();
if (!l_settings_load_from_file(settings, path))
if (!l_settings_load_from_file(settings, path)) {
l_error("Error loading %s", path);
goto error;
}
if (type != SECURITY_NONE && !storage_decrypt(settings, path, ssid))
goto error;