mirror of
https://github.com/espressif/openthread.git
synced 2026-08-29 21:39:54 +00:00
[meshcop] introduce new public APIs for SteeringData (#12148)
This commit introduces a set of public APIs to allow manipulation of `otSteeringData`. The new APIs are provided when the configuration `OPENTHREAD_CONFIG_MESHCOP_STEERING_DATA_API_ENABLE` is enabled. The internal `SteeringData` is also improved to enhance robustness. Methods such as `Init()`, `UpdateBloomFilter()` now return an `Error` to signal failures on invalid arguments (e.g., invalid length) instead of asserting.
This commit is contained in:
@@ -2696,9 +2696,9 @@ void Mle::SetSteeringData(const Mac::ExtAddress *aExtAddress)
|
||||
{
|
||||
Mac::ExtAddress joinerId;
|
||||
|
||||
mSteeringData.Init();
|
||||
IgnoreError(mSteeringData.Init(MeshCoP::SteeringData::kMaxLength));
|
||||
MeshCoP::ComputeJoinerId(*aExtAddress, joinerId);
|
||||
mSteeringData.UpdateBloomFilter(joinerId);
|
||||
IgnoreError(mSteeringData.UpdateBloomFilter(joinerId));
|
||||
}
|
||||
}
|
||||
#endif // OPENTHREAD_CONFIG_MLE_STEERING_DATA_SET_OOB_ENABLE
|
||||
|
||||
Reference in New Issue
Block a user