From 07eddd481372129e5a3755eadb193f45dc710ef4 Mon Sep 17 00:00:00 2001 From: rgoliver Date: Thu, 19 May 2022 19:30:58 -0400 Subject: [PATCH] EFR lock example: Fix crash from lock (#18623) Efr lock example was crashing from a missing lock at init. Added the required lock around the offending code. --- examples/lock-app/efr32/src/AppTask.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/lock-app/efr32/src/AppTask.cpp b/examples/lock-app/efr32/src/AppTask.cpp index 27e376503bfdd9..2df296d38e49fb 100644 --- a/examples/lock-app/efr32/src/AppTask.cpp +++ b/examples/lock-app/efr32/src/AppTask.cpp @@ -235,7 +235,6 @@ CHIP_ERROR AppTask::Init() chip::EndpointId endpointId{ 1 }; chip::DeviceLayer::PlatformMgr().LockChipStack(); chip::app::Clusters::DoorLock::Attributes::LockState::Get(endpointId, state); - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); uint8_t maxCredentialsPerUser = 0; if (!DoorLockServer::Instance().GetNumberOfCredentialsSupportedPerUser(endpointId, maxCredentialsPerUser)) @@ -246,6 +245,7 @@ CHIP_ERROR AppTask::Init() endpointId); maxCredentialsPerUser = 5; } + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); err = LockMgr().Init(state, maxCredentialsPerUser); if (err != CHIP_NO_ERROR)