From 20060989787538ba0aec034788e03520d172f361 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 17 Feb 2023 16:28:14 -0500 Subject: [PATCH] Fix backwards error check when storing reboot reason. (#25154) --- examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index af82296a5ecdbc..da9f7884d094e1 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -160,7 +160,7 @@ bool AllClustersAppCommandHandler::IsClusterPresentOnAnyEndpoint(ClusterId clust void AllClustersAppCommandHandler::OnRebootSignalHandler(BootReasonType bootReason) { - if (ConfigurationMgr().StoreBootReason(static_cast(bootReason)) != CHIP_NO_ERROR) + if (ConfigurationMgr().StoreBootReason(static_cast(bootReason)) == CHIP_NO_ERROR) { Server::GetInstance().GenerateShutDownEvent(); PlatformMgr().ScheduleWork([](intptr_t) { PlatformMgr().StopEventLoopTask(); });