Skip to content

Commit 5ae3e83

Browse files
authored
Fix wrong password same SSID (#5124)
When iterating through APlist from first to the last element, a corrected password for already known SSID is not used. Therefore, I propose to iterate from the back of the list. With iterating from the back through the vector, an already known SSID with a corrected password is used instead.
1 parent eca328e commit 5ae3e83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/WiFi/src/WiFiMulti.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout)
128128
WiFi.getNetworkInfo(i, ssid_scan, sec_scan, rssi_scan, BSSID_scan, chan_scan);
129129

130130
bool known = false;
131-
for(uint32_t x = 0; x < APlist.size(); x++) {
132-
WifiAPlist_t entry = APlist[x];
131+
for(uint32_t x = APlist.size() ; x > 0; x--) {
132+
WifiAPlist_t entry = APlist[x-1];
133133

134134
if(ssid_scan == entry.ssid) { // SSID match
135135
known = true;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy