[dhcp6-server] change AddPrefixAgent() to return void (#4941)

This commit is contained in:
Jonathan Hui
2020-05-11 12:44:54 -07:00
parent 0315ac0a0f
commit 97debabc03
2 changed files with 8 additions and 4 deletions
+7 -3
View File
@@ -114,7 +114,7 @@ otError Dhcp6Server::UpdateService(void)
if (error == OT_ERROR_NONE)
{
IgnoreError(AddPrefixAgent(config.mPrefix, lowpanContext));
AddPrefixAgent(config.mPrefix, lowpanContext);
}
}
@@ -144,7 +144,7 @@ void Dhcp6Server::Stop(void)
IgnoreError(mSocket.Close());
}
otError Dhcp6Server::AddPrefixAgent(const otIp6Prefix &aIp6Prefix, const Lowpan::Context &aContext)
void Dhcp6Server::AddPrefixAgent(const otIp6Prefix &aIp6Prefix, const Lowpan::Context &aContext)
{
otError error = OT_ERROR_NONE;
PrefixAgent *newEntry = NULL;
@@ -169,7 +169,11 @@ otError Dhcp6Server::AddPrefixAgent(const otIp6Prefix &aIp6Prefix, const Lowpan:
mPrefixAgentsCount++;
exit:
return error;
if (error != OT_ERROR_NONE)
{
otLogNoteIp6("Failed to add DHCPv6 prefix agent: %s", otThreadErrorToString(error));
}
}
void Dhcp6Server::HandleUdpReceive(void *aContext, otMessage *aMessage, const otMessageInfo *aMessageInfo)
+1 -1
View File
@@ -187,7 +187,7 @@ private:
void Start(void);
void Stop(void);
otError AddPrefixAgent(const otIp6Prefix &aIp6Prefix, const Lowpan::Context &aContext);
void AddPrefixAgent(const otIp6Prefix &aIp6Prefix, const Lowpan::Context &aContext);
otError AppendHeader(Message &aMessage, uint8_t *aTransactionId);
otError AppendClientIdentifier(Message &aMessage, ClientIdentifier &aClientId);