Skip to contentSkip to conversation

station: print reason why autoconnect failed

PATCH Applied James Prestwood 2 participants 2 messages May 4, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 station: print reason why autoconnect failed

---
 src/station.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
src/station.c +5 -3
index 442f8ee2..d2234e15 100644
@@ -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);
 	}
 }
 
Signature · 1 line
2.26.2
#1 lore raw

Hi James,

Quoted 4 lines · James Prestwood
---
  src/station.c | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)

Applied, thanks.

Regards,
-Denis