From 9c5bdd0d57b465be2afaa63b7c58bc225ab0043f Mon Sep 17 00:00:00 2001 From: Pradip De Date: Mon, 17 Jun 2024 23:46:28 -0700 Subject: [PATCH] Pass largepayload flag into CommandSender in IM test app. Use the session information from DeviceProxy to construct CommandSender for large payload if session supports it. Co-authored-by: Andrei Litvin --- .../suites/commands/interaction_model/InteractionModel.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/tests/suites/commands/interaction_model/InteractionModel.h b/src/app/tests/suites/commands/interaction_model/InteractionModel.h index 8070c6d001b47d..3acafb8de2acee 100644 --- a/src/app/tests/suites/commands/interaction_model/InteractionModel.h +++ b/src/app/tests/suites/commands/interaction_model/InteractionModel.h @@ -252,7 +252,9 @@ class InteractionModelCommands chip::app::CommandPathParams commandPath = { endpointId, clusterId, commandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; auto commandSender = std::make_unique( - mCallback, device->GetExchangeManager(), mTimedInteractionTimeoutMs.HasValue(), mSuppressResponse.ValueOr(false)); + mCallback, device->GetExchangeManager(), mTimedInteractionTimeoutMs.HasValue(), mSuppressResponse.ValueOr(false), + device->GetSecureSession().Value()->AllowsLargePayload()); + VerifyOrReturnError(commandSender != nullptr, CHIP_ERROR_NO_MEMORY); chip::app::CommandSender::AddRequestDataParameters addRequestDataParams(mTimedInteractionTimeoutMs);