Skip to content

Commit 1d14956

Browse files
committed
Fix WiFi scan issue (esp8266#1355)
1 parent aa0c14c commit 1d14956

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/ESP8266WiFi/src/ESP8266WiFiScan.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,17 +281,17 @@ void ESP8266WiFiScanClass::_scanDone(void* result, int status) {
281281
} else {
282282

283283
int i = 0;
284-
bss_info_head_t* head = reinterpret_cast<bss_info_head_t*>(result);
284+
bss_info* head = reinterpret_cast<bss_info*>(result);
285285

286-
for(bss_info* it = STAILQ_FIRST(head); it; it = STAILQ_NEXT(it, next), ++i)
286+
for(bss_info* it = head; it; it = STAILQ_NEXT(it, next), ++i)
287287
;
288288
ESP8266WiFiScanClass::_scanCount = i;
289289
if(i == 0) {
290290
ESP8266WiFiScanClass::_scanResult = 0;
291291
} else {
292292
bss_info* copied_info = new bss_info[i];
293293
i = 0;
294-
for(bss_info* it = STAILQ_FIRST(head); it; it = STAILQ_NEXT(it, next), ++i) {
294+
for(bss_info* it = head; it; it = STAILQ_NEXT(it, next), ++i) {
295295
memcpy(copied_info + i, it, sizeof(bss_info));
296296
}
297297

0 commit comments

Comments
 (0)