[wifi-connect] regression: can't join after connect to AP fails

Bug #1726567 reported by Kyle Nitzsche
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snappy-hwe-snaps
Fix Released
Medium
Kyle Nitzsche

Bug Description

Running from tip of master today (not the released snap on beta), I noticed that when I entered an incorrect passphrase for an external AP and tried to connect, the daemon now fails to recover as it used to, so this is a regression.

Expected behavior: when the attempt to connect to an external AP fails for any reason, the daemon should react by putting up the local AP and the "Management" page, thereby allowing a person to join and try again.

Pretty sure the problem is that when the netman.ConnectAp() [1] func returns an error (for example because the passphrase is found to be wrong), the ConnectHandler() func now returns *before* having reset the state appropriately (by removing a flag file that tells the daemon to do nothing). Thus, the daemon does not know to take control again.

That code to reset state by removing the flag file should be moved into the block that executes only on connect failure (when err != nil).

[1] https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/wifi-connect/tree/server/handlers.go#n205

summary: - [wifi-connect] regression: bad state when connect to AP fails
+ [wifi-connect] regression: can't join after connect to AP fails
Changed in snappy-hwe-snaps:
assignee: nobody → Kyle Nitzsche (knitzsche)
importance: Undecided → Medium
status: New → In Progress
Changed in snappy-hwe-snaps:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.