($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 1/5] network: remove 'path' from settings_load_pt_ecc
Date: Thu, 14 Dec 2023 10:01:06 -0800	[thread overview]
Message-ID: <20231214180110.130991-1-prestwoj@gmail.com> (raw)

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


             reply	other threads:[~2023-12-14 18:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 18:01 James Prestwood [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231214180110.130991-1-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).