Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH] station: print reason why autoconnect failed
Date: Tue, 04 May 2021 08:09:18 -0700	[thread overview]
Message-ID: <20210504150918.385215-1-prestwoj@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 965 bytes --]

---
 src/station.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/station.c b/src/station.c
index 442f8ee2..d2234e15 100644
--- a/src/station.c
+++ b/src/station.c
@@ -180,10 +180,11 @@ static void station_autoconnect_next(struct station *station)
 	int r;
 
 	while ((entry = l_queue_pop_head(station->autoconnect_list))) {
+		const char *ssid = network_get_ssid(entry->network);
+
 		l_debug("Considering autoconnecting to BSS '%s' with SSID: %s,"
 			" freq: %u, rank: %u, strength: %i",
-			util_address_to_string(entry->bss->addr),
-			network_get_ssid(entry->network),
+			util_address_to_string(entry->bss->addr), ssid,
 			entry->bss->frequency, entry->rank,
 			entry->bss->signal_strength);
 
@@ -206,7 +207,8 @@ static void station_autoconnect_next(struct station *station)
 			}
 
 			return;
-		}
+		} else
+			l_debug("Failed to autoconnect to %s (%d)", ssid, r);
 	}
 }
 
-- 
2.26.2

             reply	other threads:[~2021-05-04 15:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04 15:09 James Prestwood [this message]
2021-05-04 15:31 ` [PATCH] station: print reason why autoconnect failed 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=20210504150918.385215-1-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.01.org \
    /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