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.
This commit is contained in:
		
							parent
							
								
									eca328e576
								
							
						
					
					
						commit
						5ae3e836f9
					
				| @ -128,8 +128,8 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout) | ||||
|                 WiFi.getNetworkInfo(i, ssid_scan, sec_scan, rssi_scan, BSSID_scan, chan_scan); | ||||
| 
 | ||||
|                 bool known = false; | ||||
|                 for(uint32_t x = 0; x < APlist.size(); x++) { | ||||
|                     WifiAPlist_t entry = APlist[x]; | ||||
|                 for(uint32_t x = APlist.size() ; x > 0; x--) { | ||||
|                     WifiAPlist_t entry = APlist[x-1]; | ||||
| 
 | ||||
|                     if(ssid_scan == entry.ssid) { // SSID match
 | ||||
|                         known = true; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user