Skip to contentSkip to conversation

station: fail if trying to scan while connecting

PATCH Applied James Prestwood 2 participants 2 messages Nov 14, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 station: fail if trying to scan while connecting

If a scan is requested during the middle of a connection we should return busy instead of attempting the scan. The kernel ends up coming back with not supported in this case, which is misleading and difficult to debug.

---
 src/station.c | 3 +++
 1 file changed, 3 insertions(+)
src/station.c +3 -0
index 76cf20a1..0da352c3 100644
@@ -2751,6 +2751,9 @@ static struct l_dbus_message *station_dbus_scan(struct l_dbus *dbus,
 	if (station->dbus_scan_id)
 		return dbus_error_busy(message);
 
+	if (station->state == STATION_STATE_CONNECTING)
+		return dbus_error_busy(message);
+
 	station->dbus_scan_id = station_scan_trigger(station, NULL,
 						station_dbus_scan_triggered,
 						new_scan_results,
Signature · 1 line
2.17.1
#1 lore raw

Hi James,

Quoted 8 lines · James Prestwood

If a scan is requested during the middle of a connection we should return busy instead of attempting the scan. The kernel ends up coming back with not supported in this case, which is misleading and difficult to debug.

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

Applied, thanks.

Regards,
-Denis