Message API cleanup.

This commit is contained in:
Jonathan Hui
2017-03-02 10:24:55 -08:00
parent 77bc491c56
commit 1455b612f9
27 changed files with 323 additions and 304 deletions
+1 -1
View File
@@ -3164,7 +3164,7 @@ otGetMacCounters(
OTAPI
void
OTCALL
otGetMessageBufferInfo(
otMessageGetBufferInfo(
_In_ otInstance *,
_Out_ otBufferInfo *aBufferInfo
)
+3 -3
View File
@@ -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
{