[mle] change HandleChildStart() to return void (#4941)

This commit is contained in:
Jonathan Hui
2020-05-11 12:44:54 -07:00
parent 86be53e190
commit 40f4d20c9d
3 changed files with 4 additions and 8 deletions
+1 -1
View File
@@ -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
+2 -6
View File
@@ -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)
+1 -1
View File
@@ -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,