mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/fix_iperf_example_exception_handling_for_no_ap_found_v3.3' into 'release/v3.3'
bugfix/fix_iperf_example_exception_handling_for_no_ap_found_v3.3 See merge request espressif/esp-idf!12274
This commit is contained in:
commit
c3e3f8b490
@ -60,6 +60,11 @@ static void scan_done_handler(void)
|
||||
wifi_ap_record_t *ap_list_buffer;
|
||||
|
||||
esp_wifi_scan_get_ap_num(&sta_number);
|
||||
if (!sta_number) {
|
||||
ESP_LOGE(TAG, "No AP found");
|
||||
return;
|
||||
}
|
||||
|
||||
ap_list_buffer = malloc(sta_number * sizeof(wifi_ap_record_t));
|
||||
if (ap_list_buffer == NULL) {
|
||||
ESP_LOGE(TAG, "Failed to malloc buffer to print scan results");
|
||||
|
Loading…
Reference in New Issue
Block a user