mirror of
https://github.com/espressif/openthread.git
synced 2026-07-31 08:07:47 +00:00
[mle] change HandleChildStart() to return void (#4941)
This commit is contained in:
@@ -790,7 +790,7 @@ void Mle::SetStateChild(uint16_t aRloc16)
|
||||
#if OPENTHREAD_FTD
|
||||
if (IsFullThreadDevice())
|
||||
{
|
||||
IgnoreError(Get<MleRouter>().HandleChildStart(mParentRequestMode));
|
||||
Get<MleRouter>().HandleChildStart(mParentRequestMode);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -229,10 +229,8 @@ void MleRouter::HandleDetachStart(void)
|
||||
mStateUpdateTimer.Stop();
|
||||
}
|
||||
|
||||
otError MleRouter::HandleChildStart(AttachMode aMode)
|
||||
void MleRouter::HandleChildStart(AttachMode aMode)
|
||||
{
|
||||
otError error = OT_ERROR_NONE;
|
||||
|
||||
// reset `rejected` flag whenever REED becomes child.
|
||||
mAddressSolicitRejected = false;
|
||||
|
||||
@@ -248,7 +246,7 @@ otError MleRouter::HandleChildStart(AttachMode aMode)
|
||||
|
||||
IgnoreError(Get<ThreadNetif>().SubscribeAllRoutersMulticast());
|
||||
|
||||
VerifyOrExit(IsRouterIdValid(mPreviousRouterId), error = OT_ERROR_INVALID_STATE);
|
||||
VerifyOrExit(IsRouterIdValid(mPreviousRouterId), OT_NOOP);
|
||||
|
||||
switch (aMode)
|
||||
{
|
||||
@@ -306,8 +304,6 @@ exit:
|
||||
{
|
||||
SetRouterId(kInvalidRouterId);
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
void MleRouter::SetStateRouter(uint16_t aRloc16)
|
||||
|
||||
@@ -725,7 +725,7 @@ private:
|
||||
void GetNeighborInfo(Neighbor &aNeighbor, otNeighborInfo &aNeighInfo);
|
||||
otError RefreshStoredChildren(void);
|
||||
void HandleDetachStart(void);
|
||||
otError HandleChildStart(AttachMode aMode);
|
||||
void HandleChildStart(AttachMode aMode);
|
||||
void HandleLinkRequest(const Message &aMessage, const Ip6::MessageInfo &aMessageInfo, Neighbor *aNeighbor);
|
||||
void HandleLinkAccept(const Message & aMessage,
|
||||
const Ip6::MessageInfo &aMessageInfo,
|
||||
|
||||
Reference in New Issue
Block a user