Previously the wifi retry count was never reset once MAXIMUM_RETRIES
had been reached, making it impossible to connect.

This commit rectifies the issue by ensuring we always reset the
current retries count to zero once we hit either the MAXIMUM_RETRIES
or FAVORITE_MAXIMUM_RETRIES limits, allowing networks to be tried
again.

Signed-off-by: Michael Ikey Doherty <[email protected]>
---
 plugins/wifi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/plugins/wifi.c b/plugins/wifi.c
index f676218..c0234b3 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -1599,6 +1599,7 @@ static bool 
handle_4way_handshake_failure(GSupplicantInterface *interface,
        } else if (wifi->retries < MAXIMUM_RETRIES)
                return true;
 
+       wifi->retries = 0;
        connman_network_set_error(network, CONNMAN_NETWORK_ERROR_INVALID_KEY);
 
        return false;
-- 
1.8.3.1

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to