Skip to content

Commit

Permalink
Encode an empty list as now ActiveNetworkFault are tracked for the th…
Browse files Browse the repository at this point in the history
…read network (project-chip#32391)
  • Loading branch information
jmartinez-silabs authored Mar 1, 2024
1 parent bbf5f75 commit 00227dc
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -670,16 +670,9 @@ CHIP_ERROR WriteThreadNetworkDiagnosticAttributeToTlv(AttributeId attributeId, a
break;

case Attributes::ActiveNetworkFaultsList::Id: {
err = encoder.EncodeList([](const auto & aEncoder) -> CHIP_ERROR {
// TODO activeNetworkFaultsList isn't tracked. Encode the list of 4 entries at 0 none the less
NetworkFaultEnum activeNetworkFaultsList[4] = { NetworkFaultEnum(0) };
for (auto fault : activeNetworkFaultsList)
{
ReturnErrorOnFailure(aEncoder.Encode(fault));
}

return CHIP_NO_ERROR;
});
// activeNetworkFaults are not tracked by the thread stack nor the ThreadStackManager.
// Encode an emptyList to indicate there are currently no active faults.
err = encoder.EncodeEmptyList();
}
break;

Expand Down

0 comments on commit 00227dc

Please sign in to comment.