[message] allocate message with corresponding component (#3403)

This commit is contained in:
Yakun Xu
2018-12-27 15:55:16 -08:00
committed by Jonathan Hui
parent 0e31b0d617
commit 99c753a6ad
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -211,7 +211,7 @@ otMessage *otIp6NewMessage(otInstance *aInstance, const otMessageSettings *aSett
VerifyOrExit(aSettings->mPriority <= OT_MESSAGE_PRIORITY_HIGH, message = NULL);
}
message = instance.GetMessagePool().New(Message::kTypeIp6, 0, aSettings);
message = instance.GetIp6().NewMessage(0, aSettings);
exit:
return message;
+1 -1
View File
@@ -50,7 +50,7 @@ otMessage *otUdpNewMessage(otInstance *aInstance, const otMessageSettings *aSett
VerifyOrExit(aSettings->mPriority <= OT_MESSAGE_PRIORITY_HIGH, message = NULL);
}
message = instance.GetMessagePool().New(Message::kTypeIp6, 0, aSettings);
message = instance.GetIp6().GetUdp().NewMessage(0, aSettings);
exit:
return message;