Skip to content

Commit 1a09845

Browse files
pidarpedandy31415
andauthoredJun 18, 2024
Update src/app/tests/suites/commands/interaction_model/InteractionModel.h
Co-authored-by: Andrei Litvin <andy314@gmail.com>
1 parent b652d5c commit 1a09845

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed
 

‎src/app/tests/suites/commands/interaction_model/InteractionModel.h

+8-14
Original file line numberDiff line numberDiff line change
@@ -251,20 +251,14 @@ class InteractionModelCommands
251251

252252
chip::app::CommandPathParams commandPath = { endpointId, clusterId, commandId,
253253
(chip::app::CommandPathFlags::kEndpointIdValid) };
254-
std::unique_ptr<chip::app::CommandSender> commandSender;
255-
if (device->GetSecureSession().Value()->AllowsLargePayload())
256-
{
257-
commandSender = std::make_unique<chip::app::CommandSender>(mCallback, device->GetExchangeManager(),
258-
mTimedInteractionTimeoutMs.HasValue(),
259-
mSuppressResponse.ValueOr(false),
260-
/* allowLargePayload = */ true);
261-
}
262-
else
263-
{
264-
commandSender = std::make_unique<chip::app::CommandSender>(mCallback, device->GetExchangeManager(),
265-
mTimedInteractionTimeoutMs.HasValue(),
266-
mSuppressResponse.ValueOr(false));
267-
}
254+
std::unique_ptr<chip::app::CommandSender> commandSender =
255+
std::make_unique<chip::app::CommandSender>(
256+
mCallback,
257+
device->GetExchangeManager(),
258+
mTimedInteractionTimeoutMs.HasValue(),
259+
mSuppressResponse.ValueOr(false),
260+
device->GetSecureSession().Value()->AllowsLargePayload());
261+
268262
VerifyOrReturnError(commandSender != nullptr, CHIP_ERROR_NO_MEMORY);
269263

270264
chip::app::CommandSender::AddRequestDataParameters addRequestDataParams(mTimedInteractionTimeoutMs);

0 commit comments

Comments
 (0)