bleData->dataLen - (CA_BLE_HEADER_SIZE + CA_BLE_LENGTH_HEADER_SIZE);
OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Total data to be accumulated [%u] bytes",
newSender->totalDataLen);
- OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "data received in the first packet [%u] bytes",
+ OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "data received in the first packet [%zu] bytes",
dataOnlyLen);
newSender->defragData = OICCalloc(newSender->totalDataLen + 1,
if (senderInfo->recvDataLen + dataOnlyLen > senderInfo->totalDataLen)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
- "Data Length exceeding error!! Receiving [%d] total length [%d]",
+ "Data Length exceeding error!! Receiving [%zu] total length [%u]",
senderInfo->recvDataLen + dataOnlyLen, senderInfo->totalDataLen);
u_arraylist_remove(bleData->senderInfo, senderIndex);
OICFree(senderInfo->defragData);
oc_mutex_unlock(g_bleReceiveDataMutex);
return;
}
- OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Copying the data of length [%d]",
+ OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Copying the data of length [%zu]",
dataOnlyLen);
memcpy(senderInfo->defragData + senderInfo->recvDataLen,
bleData->data + CA_BLE_HEADER_SIZE,
}
OIC_LOG_V(DEBUG, CALEADAPTER_TAG,
- "Packet info: data size[%d] midPacketCount[%d] remainingLen[%d] totalLength[%d]",
+ "Packet info: data size[%d] midPacketCount[%u] remainingLen[%zu] totalLength[%zu]",
bleData->dataLen, midPacketCount, remainingLen, totalLength);
OIC_LOG_V(DEBUG,
CALEADAPTER_TAG,
- "Server total Data length with header is [%u]",
+ "Server total Data length with header is [%zu]",
totalLength);
uint8_t dataSegment[CA_SUPPORTED_BLE_MTU_SIZE] = {0};
return;
}
OIC_LOG_V(DEBUG, CALEADAPTER_TAG,
- "Server Sent data length [%d]", remainingLen + CA_BLE_HEADER_SIZE);
+ "Server Sent data length [%zu]", remainingLen + CA_BLE_HEADER_SIZE);
}
}
else
return;
}
OIC_LOG_V(DEBUG, CALEADAPTER_TAG,
- "Server Sent data length [%d]", remainingLen + CA_BLE_HEADER_SIZE);
+ "Server Sent data length [%zu]", remainingLen + CA_BLE_HEADER_SIZE);
}
}
}
OIC_LOG_V(DEBUG, CALEADAPTER_TAG,
- "Packet info: data size[%d] midPacketCount[%d] remainingLen[%d] totalLength[%d]",
+ "Packet info: data size[%d] midPacketCount[%u] remainingLen[%zu] totalLength[%zu]",
bleData->dataLen, midPacketCount, remainingLen, totalLength);
uint8_t dataSegment[CA_SUPPORTED_BLE_MTU_SIZE] = {0};
return;
}
OIC_LOG_V(DEBUG, CALEADAPTER_TAG,
- "Client Sent Data length is [%d]", remainingLen + CA_BLE_HEADER_SIZE);
+ "Client Sent Data length is [%zu]", remainingLen + CA_BLE_HEADER_SIZE);
}
}
else
return;
}
OIC_LOG_V(DEBUG, CALEADAPTER_TAG,
- "Client Sent Data length is [%d]", remainingLen + CA_BLE_HEADER_SIZE);
+ "Client Sent Data length is [%zu]", remainingLen + CA_BLE_HEADER_SIZE);
}
}
uint32_t arrayLength = u_arraylist_length(portList);
for (uint32_t i = 0; i < arrayLength; i++)
{
- uint16_t port = u_arraylist_get(portList, i);
+ uint16_t port = (uint16_t)(uintptr_t)u_arraylist_get(portList, i);
OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "port : %X", port);
if (CA_STATUS_OK == CALEGetSenderInfo(address, port,
if (!strncmp(info->remoteEndpoint->addr, leAddress, addrLength))
{
- u_arraylist_add(portList, (void *)info->remoteEndpoint->port);
+ u_arraylist_add(portList, (void *)(uintptr_t)info->remoteEndpoint->port);
}
}
OC_STACK_PDM_IS_NOT_INITIALIZED,
OC_STACK_DUPLICATE_UUID,
OC_STACK_INCONSISTENT_DB,
- OC_STACK_AUTHENTICATION_FAILURE
+ OC_STACK_AUTHENTICATION_FAILURE,
+ OC_STACK_FORBIDDEN_REQ,
+ OC_STACK_INTERNAL_SERVER_ERROR
};
std::string resultMessages[]=
OC::Exception::PDM_DB_NOT_INITIALIZED,
OC::Exception::DUPLICATE_UUID,
OC::Exception::INCONSISTENT_DB,
- OC::Exception::AUTHENTICATION_FAILURE
+ OC::Exception::AUTHENTICATION_FAILURE,
+ OC::Exception::FORBIDDEN_REQ,
+ OC::Exception::INTERNAL_SERVER_ERROR
};
TEST(OCExceptionTest, ReasonCodeMatches)
{