From c0cae1942d9571e2ca8a0afa0e9fac2bc579f7c3 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav Date: Thu, 18 Jan 2024 15:17:14 +0530 Subject: [PATCH] We should call correct API for factory reset in CLI command --- src/lib/shell/commands/Device.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/shell/commands/Device.cpp b/src/lib/shell/commands/Device.cpp index 7e26a75a5c32fb..86b2a5229a9fec 100644 --- a/src/lib/shell/commands/Device.cpp +++ b/src/lib/shell/commands/Device.cpp @@ -20,6 +20,7 @@ #if CONFIG_DEVICE_LAYER #include #endif +#include #include #include #include @@ -42,7 +43,7 @@ int DeviceHelpHandler(int argc, char ** argv) static CHIP_ERROR FactoryResetHandler(int argc, char ** argv) { streamer_printf(streamer_get(), "Performing factory reset ... \r\n"); - DeviceLayer::ConfigurationMgr().InitiateFactoryReset(); + chip::Server::GetInstance().ScheduleFactoryReset(); return CHIP_NO_ERROR; }