mirror of
https://github.com/espressif/openthread.git
synced 2026-09-17 14:40:07 +00:00
Message API cleanup.
This commit is contained in:
@@ -3164,7 +3164,7 @@ otGetMacCounters(
|
||||
OTAPI
|
||||
void
|
||||
OTCALL
|
||||
otGetMessageBufferInfo(
|
||||
otMessageGetBufferInfo(
|
||||
_In_ otInstance *,
|
||||
_Out_ otBufferInfo *aBufferInfo
|
||||
)
|
||||
|
||||
@@ -425,7 +425,7 @@ otLwfReceiveIp6DatagramCallback(
|
||||
)
|
||||
{
|
||||
PMS_FILTER pFilter = (PMS_FILTER)aContext;
|
||||
uint16_t messageLength = otGetMessageLength(aMessage);
|
||||
uint16_t messageLength = otMessageGetLength(aMessage);
|
||||
PNET_BUFFER_LIST NetBufferList = NULL;
|
||||
PNET_BUFFER NetBuffer = NULL;
|
||||
NDIS_STATUS Status = NDIS_STATUS_SUCCESS;
|
||||
@@ -487,7 +487,7 @@ otLwfReceiveIp6DatagramCallback(
|
||||
}
|
||||
|
||||
// Read the bytes to the buffer
|
||||
BytesRead = otReadMessage(aMessage, 0, DataBuffer, messageLength);
|
||||
BytesRead = otMessageRead(aMessage, 0, DataBuffer, messageLength);
|
||||
NT_ASSERT(BytesRead == (int)messageLength);
|
||||
if (BytesRead != (int)messageLength)
|
||||
{
|
||||
@@ -563,7 +563,7 @@ otLwfReceiveIp6DatagramCallback(
|
||||
|
||||
error:
|
||||
|
||||
otFreeMessage(aMessage);
|
||||
otMessageFree(aMessage);
|
||||
}
|
||||
|
||||
// Called in response to receiving a Spinel Ip6 packet command
|
||||
|
||||
@@ -908,11 +908,11 @@ otLwfEventWorkerThread(
|
||||
if (message)
|
||||
{
|
||||
// Write to the message
|
||||
error = otAppendMessage(message, MessageBuffer, (uint16_t)NET_BUFFER_DATA_LENGTH(CurrNb));
|
||||
error = otMessageAppend(message, MessageBuffer, (uint16_t)NET_BUFFER_DATA_LENGTH(CurrNb));
|
||||
if (error != kThreadError_None)
|
||||
{
|
||||
LogError(DRIVER_DATA_PATH, "otAppendMessage failed with %!otError!", error);
|
||||
otFreeMessage(message);
|
||||
otMessageFree(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user