From 92db1d4b4fc9a5a62de15d681f492e46a905822d Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Tue, 4 Apr 2023 03:44:30 +0530 Subject: [PATCH] [ESP32] Fixed lock app crash (#25895) * [ESP32] Fixed lock app crash * Used RAII lock --- examples/lock-app/esp32/main/AppTask.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/lock-app/esp32/main/AppTask.cpp b/examples/lock-app/esp32/main/AppTask.cpp index a9fc2c35cdbd86..27aad563daa613 100644 --- a/examples/lock-app/esp32/main/AppTask.cpp +++ b/examples/lock-app/esp32/main/AppTask.cpp @@ -59,7 +59,6 @@ StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; using namespace ::chip::DeviceLayer; using namespace ::chip::System; -// using namespace ESP32DoorLock::LockInitParams; AppTask AppTask::sAppTask; @@ -86,6 +85,8 @@ CHIP_ERROR AppTask::Init() (void *) this, // init timer id = app task obj context TimerEventHandler // timer callback handler ); + + chip::DeviceLayer::StackLock lock; CHIP_ERROR err = BoltLockMgr().InitLockState(); BoltLockMgr().SetCallbacks(ActionInitiated, ActionCompleted);