Skip to content

Commit

Permalink
[ESP32] Fix SSID being printed as garbage (#15069)
Browse files Browse the repository at this point in the history
* [ESP32] Fix SSID being printed as garbage

* Apply suggestions from code review

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Restyled by clang-format

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
3 people authored Feb 11, 2022
1 parent df19dfd commit 512ab16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/platform/ESP32/NetworkCommissioningWiFiDriver.cpp
Original file line number Diff line number Diff line change
@@ -161,7 +161,8 @@ void ESPWiFiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callbac

VerifyOrExit(NetworkMatch(mStagingNetwork, networkId), networkingStatus = Status::kNetworkIDNotFound);
VerifyOrExit(mpConnectCallback == nullptr, networkingStatus = Status::kUnknownError);
ChipLogProgress(NetworkProvisioning, "ESP NetworkCommissioningDelegate: SSID: %s", networkId.data());
ChipLogProgress(NetworkProvisioning, "ESP NetworkCommissioningDelegate: SSID: %.*s", static_cast<int>(networkId.size()),
networkId.data());

err = ConnectWiFiNetwork(reinterpret_cast<const char *>(mStagingNetwork.ssid), mStagingNetwork.ssidLen,
reinterpret_cast<const char *>(mStagingNetwork.credentials), mStagingNetwork.credentialsLen);

0 comments on commit 512ab16

Please sign in to comment.