mirror of
https://github.com/espressif/openthread.git
synced 2026-08-05 02:17:47 +00:00
[mle] change SendDataResponse() to return void (#4941)
This commit is contained in:
@@ -2676,7 +2676,7 @@ void MleRouter::HandleDataRequest(const Message & aMessage,
|
||||
tlvs[numTlvs++] = Tlv::kPendingDataset;
|
||||
}
|
||||
|
||||
IgnoreError(SendDataResponse(aMessageInfo.GetPeerAddr(), tlvs, numTlvs, 0));
|
||||
SendDataResponse(aMessageInfo.GetPeerAddr(), tlvs, numTlvs, 0);
|
||||
|
||||
exit:
|
||||
|
||||
@@ -2697,7 +2697,7 @@ void MleRouter::HandleNetworkDataUpdateRouter(void)
|
||||
destination.SetToLinkLocalAllNodesMulticast();
|
||||
|
||||
delay = IsLeader() ? 0 : Random::NonCrypto::GetUint16InRange(0, kUnsolicitedDataResponseJitter);
|
||||
IgnoreError(SendDataResponse(destination, tlvs, sizeof(tlvs), delay));
|
||||
SendDataResponse(destination, tlvs, sizeof(tlvs), delay);
|
||||
|
||||
SynchronizeChildNetworkData();
|
||||
|
||||
@@ -3185,10 +3185,10 @@ exit:
|
||||
}
|
||||
}
|
||||
|
||||
otError MleRouter::SendDataResponse(const Ip6::Address &aDestination,
|
||||
const uint8_t * aTlvs,
|
||||
uint8_t aTlvsLength,
|
||||
uint16_t aDelay)
|
||||
void MleRouter::SendDataResponse(const Ip6::Address &aDestination,
|
||||
const uint8_t * aTlvs,
|
||||
uint8_t aTlvsLength,
|
||||
uint16_t aDelay)
|
||||
{
|
||||
otError error = OT_ERROR_NONE;
|
||||
Message * message = NULL;
|
||||
@@ -3248,12 +3248,15 @@ otError MleRouter::SendDataResponse(const Ip6::Address &aDestination,
|
||||
|
||||
exit:
|
||||
|
||||
if (error != OT_ERROR_NONE && message != NULL)
|
||||
if (error != OT_ERROR_NONE)
|
||||
{
|
||||
message->Free();
|
||||
}
|
||||
otLogWarnMle("Failed to send Data Response: %s", otThreadErrorToString(error));
|
||||
|
||||
return error;
|
||||
if (message != NULL)
|
||||
{
|
||||
message->Free();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool MleRouter::IsMinimalChild(uint16_t aRloc16)
|
||||
|
||||
@@ -775,10 +775,7 @@ private:
|
||||
const uint8_t * aTlvs,
|
||||
uint8_t aTlvsLength,
|
||||
const Challenge & aChallenge);
|
||||
otError SendDataResponse(const Ip6::Address &aDestination,
|
||||
const uint8_t * aTlvs,
|
||||
uint8_t aTlvsLength,
|
||||
uint16_t aDelay);
|
||||
void SendDataResponse(const Ip6::Address &aDestination, const uint8_t *aTlvs, uint8_t aTlvsLength, uint16_t aDelay);
|
||||
otError SendDiscoveryResponse(const Ip6::Address &aDestination, uint16_t aPanId);
|
||||
|
||||
void SetStateRouter(uint16_t aRloc16);
|
||||
|
||||
Reference in New Issue
Block a user