public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 1/5] network: remove 'path' from settings_load_pt_ecc
@ 2023-12-14 18:01 James Prestwood
  2023-12-14 18:01 ` [PATCH 2/5] knownnetworks: network: support updating known network settings James Prestwood
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: James Prestwood @ 2023-12-14 18:01 UTC (permalink / raw)
  To: iwd; +Cc: James Prestwood

The path argument was used purely for debugging. It can be just as
informational printing just the SSID of the profile that failed to
parse the setting without requiring callers allocate a string to
call the function.
---
 src/network.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/network.c b/src/network.c
index 79f964b2..41c5460b 100644
--- a/src/network.c
+++ b/src/network.c
@@ -556,7 +556,6 @@ int network_handshake_setup(struct network *network, struct scan_bss *bss,
 }
 
 static int network_settings_load_pt_ecc(struct network *network,
-					const char *path,
 					unsigned int group,
 					struct l_ecc_point **out_pt)
 {
@@ -581,7 +580,7 @@ static int network_settings_load_pt_ecc(struct network *network,
 		return 0;
 
 bad_format:
-	l_error("%s: invalid %s format", path, key);
+	l_error("%s profile: invalid %s format", network->ssid, key);
 
 generate:
 	if (!network->passphrase)
@@ -656,12 +655,10 @@ static int network_load_psk(struct network *network, struct scan_bss *bss)
 	network_reset_psk(network);
 	network->passphrase = l_steal_ptr(passphrase);
 
-	if (network_settings_load_pt_ecc(network, path,
-						19, &network->sae_pt_19) > 0)
+	if (network_settings_load_pt_ecc(network, 19, &network->sae_pt_19) > 0)
 		network->sync_settings = true;
 
-	if (network_settings_load_pt_ecc(network, path,
-						20, &network->sae_pt_20) > 0)
+	if (network_settings_load_pt_ecc(network, 20, &network->sae_pt_20) > 0)
 		network->sync_settings = true;
 
 	network->psk = l_steal_ptr(psk);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-12-15 16:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-14 18:01 [PATCH 1/5] network: remove 'path' from settings_load_pt_ecc James Prestwood
2023-12-14 18:01 ` [PATCH 2/5] knownnetworks: network: support updating known network settings James Prestwood
2023-12-15 16:37   ` Denis Kenzior
2023-12-14 18:01 ` [PATCH 3/5] dpp: fix extra settings not being used when connecting James Prestwood
2023-12-14 18:01 ` [PATCH 4/5] auto-t: add DPP tests to check extra settings are applied James Prestwood
2023-12-14 18:01 ` [PATCH 5/5] auto-t: increase RAM when running with valgrind (UML) James Prestwood
2023-12-15 16:28 ` [PATCH 1/5] network: remove 'path' from settings_load_pt_ecc Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox