mirror of
https://github.com/espressif/openthread.git
synced 2026-09-06 01:00:09 +00:00
[mle] use Tlv::FindTlvValueOffset() instead of FindTlvOffset() (#8413)
This commit updates `Mle` modules to use `FindTlvValueOffset()` instead of `FindTlvOffset()` when trying to find a variable length TLV (e.g., Network Data TLV or Address Registration TLV). This helps simplify the code (we avoid reading the TLV again and can directly read and process the TLV's value).
This commit is contained in:
@@ -129,7 +129,8 @@ static void Init(void)
|
||||
|
||||
SuccessOrQuit(message->AppendBytes(mockNetworkData, sizeof(mockNetworkData)));
|
||||
|
||||
IgnoreError(sInstance->Get<NetworkData::Leader>().SetNetworkData(0, 0, NetworkData::kStableSubset, *message, 0));
|
||||
IgnoreError(
|
||||
sInstance->Get<NetworkData::Leader>().SetNetworkData(0, 0, NetworkData::kStableSubset, *message, 2, 0x20));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user