mirror of
https://github.com/espressif/openthread.git
synced 2026-09-24 18:07:36 +00:00
[mle] log handling parent request failures (#5355)
This commit adds a few logs when handling MLE Parent Request, so that when a child failed to receive a response, the logs can tell what happened.
This commit is contained in:
@@ -1675,7 +1675,7 @@ void MleRouter::HandleParentRequest(const Message &aMessage, const Ip6::MessageI
|
||||
|
||||
if (child == nullptr)
|
||||
{
|
||||
VerifyOrExit((child = mChildTable.GetNewChild()) != nullptr, OT_NOOP);
|
||||
VerifyOrExit((child = mChildTable.GetNewChild()) != nullptr, error = OT_ERROR_NO_BUFS);
|
||||
|
||||
// MAC Address
|
||||
child->SetExtAddress(extAddr);
|
||||
@@ -1996,9 +1996,14 @@ void MleRouter::SendParentResponse(Child *aChild, const Challenge &aChallenge, b
|
||||
|
||||
exit:
|
||||
|
||||
if (error != OT_ERROR_NONE && message != nullptr)
|
||||
if (error != OT_ERROR_NONE)
|
||||
{
|
||||
message->Free();
|
||||
otLogWarnMle("Failed to send Parent Response: %s", otThreadErrorToString(error));
|
||||
|
||||
if (message != nullptr)
|
||||
{
|
||||
message->Free();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user