Skip to content

Commit

Permalink
ESP32: report network status change only when the data model provider…
Browse files Browse the repository at this point in the history
… is set
  • Loading branch information
wqx6 committed Dec 27, 2024
1 parent 2249628 commit 267a524
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/platform/ESP32/NetworkCommissioningDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

#include <app/InteractionModelEngine.h>
#include <lib/support/CodeUtils.h>
#include <lib/support/SafeInt.h>
#include <platform/CHIPDeviceLayer.h>
Expand Down Expand Up @@ -458,6 +459,7 @@ void ESPWiFiDriver::OnScanWiFiNetworkDone()

void ESPWiFiDriver::OnNetworkStatusChange()
{
VerifyOrReturn(app::InteractionModelEngine::GetInstance() && app::InteractionModelEngine::GetInstance()->GetDataModelProvider());
Network configuredNetwork;
bool staEnabled = false, staConnected = false;
VerifyOrReturn(ESP32Utils::IsStationEnabled(staEnabled) == CHIP_NO_ERROR);
Expand Down

0 comments on commit 267a524

Please sign in to comment.