Skip to contentSkip to conversation

station: only log station_autoconnect_start if autoconnecting

PATCH Applied James Prestwood 2 participants 2 messages Feb 10, 2022

lore
Share & tools
lore

James Prestwood

author
#0 lore raw

PATCH 1/1 station: only log station_autoconnect_start if autoconnecting

This debug print was before any checks which could bail out prior to autoconnect starting. This was confusing because debug logs would contain multiple "station_autoconnect_start()" prints making you think autoconnect was started several times.

---
 src/station.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/station.c +2 -2
index 8e2cabd0..6dc0074c 100644
@@ -248,8 +248,6 @@ static int station_autoconnect_next(struct station *station)
 
 static void station_autoconnect_start(struct station *station)
 {
-	l_debug("");
-
 	if (!station->autoconnect_can_start)
 		return;
 
@@ -265,6 +263,8 @@ static void station_autoconnect_start(struct station *station)
 	if (L_WARN_ON(station->autoconnect_list))
 		l_queue_destroy(station->autoconnect_list, NULL);
 
+	l_debug("");
+
 	station->autoconnect_list = l_queue_new();
 	station_network_foreach(station, network_add_foreach, station);
 	station_autoconnect_next(station);
Signature · 1 line
2.34.1
Applied
#1 lore raw

Hi James,

Quoted 8 lines · James Prestwood

This debug print was before any checks which could bail out prior to autoconnect starting. This was confusing because debug logs would contain multiple "station_autoconnect_start()" prints making you think autoconnect was started several times.

---
  src/station.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Regards,
-Denis