Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and wqx6 committed Jan 7, 2022
1 parent e59ed62 commit fa8d49c
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/platform/ESP32/NetworkCommissioningWiFiDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,18 @@ void ESPWiFiDriver::OnScanWiFiNetworkDone()
if (esp_wifi_scan_get_ap_records(&ap_number, ap_list_buffer) == ESP_OK)
{
if (CHIP_NO_ERROR == DeviceLayer::SystemLayer().ScheduleLambda([ap_number, ap_list_buffer]() {
std::unique_ptr<wifi_ap_record_t[]> auto_free(ap_list_buffer);
ESPScanResponseIterator iter(ap_number, ap_list_buffer);
if (GetInstance().mpScanCallback)
{
GetInstance().mpScanCallback->OnFinished(Status::kSuccess, CharSpan(), &iter);
GetInstance().mpScanCallback = nullptr;
}
else
{
ChipLogError(DeviceLayer, "can't find the ScanCallback function");
}

}))
std::unique_ptr<wifi_ap_record_t[]> auto_free(ap_list_buffer);
ESPScanResponseIterator iter(ap_number, ap_list_buffer);
if (GetInstance().mpScanCallback)
{
GetInstance().mpScanCallback->OnFinished(Status::kSuccess, CharSpan(), &iter);
GetInstance().mpScanCallback = nullptr;
}
else
{
ChipLogError(DeviceLayer, "can't find the ScanCallback function");
}
}))
{
ap_buffer_ptr.release();
}
Expand Down

0 comments on commit fa8d49c

Please sign in to comment.