mirror of
https://github.com/espressif/openthread.git
synced 2026-07-18 10:04:08 +00:00
[mle] simplify Start() (#3472)
This commit simplifies the `Mle::Start()` by combining its parameters. With the new definition `Start()` would always try to reattach using any saved active/pending dataset unless it is asked to attach on an announced network (i.e., `aAnnounceAttach` is `true`).
This commit is contained in:
committed by
Jonathan Hui
parent
f40f49ff32
commit
5e50914f1f
@@ -447,7 +447,7 @@ otError otThreadSetEnabled(otInstance *aInstance, bool aEnabled)
|
||||
{
|
||||
VerifyOrExit(instance.GetThreadNetif().GetMac().GetPanId() != Mac::kPanIdBroadcast,
|
||||
error = OT_ERROR_INVALID_STATE);
|
||||
error = instance.GetThreadNetif().GetMle().Start(true, false);
|
||||
error = instance.GetThreadNetif().GetMle().Start(/* aAnnounceAttach */ false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user