Skip to content

Commit 190916f

Browse files
pidarpedbzbarsky-apple
andauthoredJun 11, 2024
Apply suggestions from code review
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
1 parent 5f31784 commit 190916f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed
 

‎src/app/ReadHandler.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -921,11 +921,11 @@ void ReadHandler::ClearStateFlag(ReadHandlerFlags aFlag)
921921

922922
size_t ReadHandler::GetReportBufferMaxSize()
923923
{
924-
size_t maxBufSize = chip::app::kMaxSecureSduLengthBytes;
924+
size_t maxBufSize = kMaxSecureSduLengthBytes;
925925
Transport::SecureSession * session = GetSession();
926926
if (session && session->AllowsLargePayload())
927927
{
928-
maxBufSize = chip::app::kMaxLargeSecureSduLengthBytes;
928+
maxBufSize = kMaxLargeSecureSduLengthBytes;
929929
}
930930

931931
return maxBufSize;

‎src/app/ReadHandler.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,10 @@ class ReadHandler : public Messaging::ExchangeDelegate
335335

336336
/*
337337
* Get the appropriate size of a packet buffer to allocate for encoding a Report message.
338-
* Depending on the underlying session, which may or may not support large
339-
* payloads, a buffer with the corresponding max size would be allocated.
338+
* This size might depend on the underlying session used by the ReadHandler.
340339
*
340+
* The size returned here is the size not including the various prepended headers
341+
* (what System::PacketBuffer calls the "available size").
341342
*/
342343
size_t GetReportBufferMaxSize();
343344

0 commit comments

Comments
 (0)