29
29
#include " app/MessageDef/StatusIB.h"
30
30
#include " app/clusters/general-commissioning-server/general-commissioning-server.h"
31
31
#include " app/data-model/Nullable.h"
32
- #include " app/server/Server.h"
33
32
#include " crypto/RandUtils.h"
34
33
#include " lib/core/CHIPError.h"
35
34
#include " lib/support/CodeUtils.h"
@@ -53,12 +52,6 @@ static bool IsOverCASESession(CommandHandlerInterface::HandlerContext & ctx)
53
52
exchangeCtx->GetSessionHandle ()->AsSecureSession ()->GetSecureSessionType () == Transport::SecureSession::Type::kCASE ;
54
53
}
55
54
56
- static bool IsFailSafeArmed (CommandHandlerInterface::HandlerContext & ctx)
57
- {
58
- auto & failSafeContext = Server::GetInstance ().GetFailSafeContext ();
59
- return failSafeContext.IsFailSafeArmed (ctx.mCommandHandler .GetAccessingFabricIndex ());
60
- }
61
-
62
55
Status ServerInstance::HandleGetDatasetRequest (bool isOverCASESession, Delegate::DatasetType type,
63
56
Thread::OperationalDataset & dataset)
64
57
{
@@ -165,7 +158,7 @@ void ServerInstance::InvokeCommand(HandlerContext & ctxt)
165
158
mPath = ctx.mRequestPath ;
166
159
mAsyncCommandHandle = CommandHandler::Handle (&ctx.mCommandHandler );
167
160
ctx.mCommandHandler .FlushAcksRightAwayOnSlowCommand ();
168
- Status status = HandleSetActiveDatasetRequest (IsFailSafeArmed (ctx), req);
161
+ Status status = HandleSetActiveDatasetRequest (IsFailSafeArmed (ctx. mCommandHandler . GetAccessingFabricIndex () ), req);
169
162
if (status != Status::Success)
170
163
{
171
164
OnActivateDatasetComplete (mRandomNumber , ChipError (ChipError::SdkPart::kIMGlobalStatus , to_underlying (status)));
@@ -341,8 +334,7 @@ void ServerInstance::OnActivateDatasetComplete(uint32_t randomNumber, CHIP_ERROR
341
334
if (error == CHIP_NO_ERROR)
342
335
{
343
336
// The successful completion of the activation process SHALL disarm the fail-safe timer.
344
- auto & failSafeContext = Server::GetInstance ().GetFailSafeContext ();
345
- failSafeContext.DisarmFailSafe ();
337
+ DisarmFailSafeTimer ();
346
338
CommitSavedBreadcrumb ();
347
339
}
348
340
else
0 commit comments