[dhcp6-client] change Solicit() to return void (#4941)

This commit is contained in:
Jonathan Hui
2020-05-11 12:44:54 -07:00
parent e79a7be773
commit 0315ac0a0f
2 changed files with 10 additions and 7 deletions
+9 -6
View File
@@ -238,7 +238,7 @@ bool Dhcp6Client::HandleTrickleTimer(void)
// fall through
case kIaStatusSoliciting:
IgnoreError(Solicit(mIdentityAssociationCurrent->mPrefixAgentRloc));
Solicit(mIdentityAssociationCurrent->mPrefixAgentRloc);
break;
case kIaStatusSolicitReplied:
@@ -261,7 +261,7 @@ exit:
return rval;
}
otError Dhcp6Client::Solicit(uint16_t aRloc16)
void Dhcp6Client::Solicit(uint16_t aRloc16)
{
otError error = OT_ERROR_NONE;
Message * message;
@@ -290,12 +290,15 @@ otError Dhcp6Client::Solicit(uint16_t aRloc16)
exit:
if (message != NULL && error != OT_ERROR_NONE)
if (message != NULL)
{
message->Free();
}
otLogWarnIp6("Failed to send DHCPv6 Solicit: %s", otThreadErrorToString(error));
return error;
if (error != OT_ERROR_NONE)
{
message->Free();
}
}
}
otError Dhcp6Client::AppendHeader(Message &aMessage)
+1 -1
View File
@@ -123,7 +123,7 @@ private:
static bool MatchNetifAddressWithPrefix(const Ip6::NetifUnicastAddress &aAddress, const otIp6Prefix &aIp6Prefix);
otError Solicit(uint16_t aRloc16);
void Solicit(uint16_t aRloc16);
void AddIdentityAssociation(uint16_t aRloc16, otIp6Prefix &aIp6Prefix);
void RemoveIdentityAssociation(uint16_t aRloc16, otIp6Prefix &aIp6Prefix);