Skip to content

Commit

Permalink
skip onEvent when mDataBufferingError has error inside
Browse files Browse the repository at this point in the history
  • Loading branch information
yunhanw-google committed Nov 1, 2024
1 parent a2d22ca commit bcdf800
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/BufferedReadCallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ class BufferedReadCallback : public ReadClient::Callback

void OnEventData(const EventHeader & aEventHeader, TLV::TLVReader * apData, const StatusIB * apStatus) override
{
if (mDataBufferingError != CHIP_NO_ERROR)
{
ChipLogError(DataManagement,
"Skipping EventData: (%u, " ChipLogFormatMEI ", " ChipLogFormatMEI ") '%" CHIP_ERROR_FORMAT "'",
aEventHeader.mEndpointId, ChipLogValueMEI(aEventHeader.mClusterId), ChipLogValueMEI(aEventHeader.mEventId),
mDataBufferingError.Format());
return;
}
return mCallback.OnEventData(aEventHeader, apData, apStatus);
}

Expand Down

0 comments on commit bcdf800

Please sign in to comment.