Merge pull request #4863 from Archcady/RTWInf

Optimize memory usage of wifi scan for REALTEK_RTW8195AM
pull/4935/head
Jimmy Brisson 2017-08-14 11:39:59 -05:00 committed by GitHub
commit 96074417b2
1 changed files with 1 additions and 3 deletions

View File

@ -73,9 +73,7 @@ static rtw_result_t scan_result_handler( rtw_scan_handler_result_t* malloced_sca
} }
ap.rssi = record->signal_strength; ap.rssi = record->signal_strength;
ap.channel = record->channel; ap.channel = record->channel;
WiFiAccessPoint *accesspoint = new WiFiAccessPoint(ap); scan_handler->ap_details[scan_handler->ap_num] = WiFiAccessPoint(ap);
memcpy(&scan_handler->ap_details[scan_handler->ap_num], accesspoint, sizeof(WiFiAccessPoint));
delete[] accesspoint;
} }
scan_handler->ap_num++; scan_handler->ap_num++;
} else{ } else{