diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index 6cad305603dedd..87dfe111709141 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -921,11 +921,11 @@ void ReadHandler::ClearStateFlag(ReadHandlerFlags aFlag) size_t ReadHandler::GetReportBufferMaxSize() { - size_t maxBufSize = chip::app::kMaxSecureSduLengthBytes; + size_t maxBufSize = kMaxSecureSduLengthBytes; Transport::SecureSession * session = GetSession(); if (session && session->AllowsLargePayload()) { - maxBufSize = chip::app::kMaxLargeSecureSduLengthBytes; + maxBufSize = kMaxLargeSecureSduLengthBytes; } return maxBufSize; diff --git a/src/app/ReadHandler.h b/src/app/ReadHandler.h index ea74f0e2af7833..c973432953275b 100644 --- a/src/app/ReadHandler.h +++ b/src/app/ReadHandler.h @@ -335,9 +335,10 @@ class ReadHandler : public Messaging::ExchangeDelegate /* * Get the appropriate size of a packet buffer to allocate for encoding a Report message. - * Depending on the underlying session, which may or may not support large - * payloads, a buffer with the corresponding max size would be allocated. + * This size might depend on the underlying session used by the ReadHandler. * + * The size returned here is the size not including the various prepended headers + * (what System::PacketBuffer calls the "available size"). */ size_t GetReportBufferMaxSize();