mirror of
https://github.com/espressif/openthread.git
synced 2026-07-29 07:07:47 +00:00
[mle] change SendAdvertisement() to return void (#4941)
This commit is contained in:
@@ -386,7 +386,7 @@ bool MleRouter::HandleAdvertiseTimer(void)
|
||||
|
||||
VerifyOrExit(IsRouterEligible(), continueTrickle = false);
|
||||
|
||||
IgnoreError(SendAdvertisement());
|
||||
SendAdvertisement();
|
||||
|
||||
exit:
|
||||
return continueTrickle;
|
||||
@@ -413,7 +413,7 @@ exit:
|
||||
return;
|
||||
}
|
||||
|
||||
otError MleRouter::SendAdvertisement(void)
|
||||
void MleRouter::SendAdvertisement(void)
|
||||
{
|
||||
otError error = OT_ERROR_NONE;
|
||||
Ip6::Address destination;
|
||||
@@ -460,12 +460,15 @@ otError MleRouter::SendAdvertisement(void)
|
||||
|
||||
exit:
|
||||
|
||||
if (error != OT_ERROR_NONE && message != NULL)
|
||||
if (error != OT_ERROR_NONE)
|
||||
{
|
||||
message->Free();
|
||||
}
|
||||
otLogWarnMle("Failed to send Advertisement: %s", otThreadErrorToString(error));
|
||||
|
||||
return error;
|
||||
if (message != NULL)
|
||||
{
|
||||
message->Free();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
otError MleRouter::SendLinkRequest(Neighbor *aNeighbor)
|
||||
@@ -1778,7 +1781,7 @@ void MleRouter::HandleStateUpdateTimer(void)
|
||||
|
||||
if (!mAdvertiseTimer.IsRunning())
|
||||
{
|
||||
IgnoreError(SendAdvertisement());
|
||||
SendAdvertisement();
|
||||
|
||||
IgnoreError(mAdvertiseTimer.Start(Time::SecToMsec(kReedAdvertiseInterval),
|
||||
Time::SecToMsec(kReedAdvertiseInterval + kReedAdvertiseJitter),
|
||||
|
||||
@@ -762,7 +762,7 @@ private:
|
||||
void SendAddressSolicitResponse(const Coap::Message & aRequest,
|
||||
const Router * aRouter,
|
||||
const Ip6::MessageInfo &aMessageInfo);
|
||||
otError SendAdvertisement(void);
|
||||
void SendAdvertisement(void);
|
||||
otError SendLinkAccept(const Ip6::MessageInfo &aMessageInfo,
|
||||
Neighbor * aNeighbor,
|
||||
const RequestedTlvs & aRequestedTlvs,
|
||||
|
||||
Reference in New Issue
Block a user