Commit ef769168 authored by Ossama Othman's avatar Ossama Othman Committed by Mike Fenelon

[connectivity] Fix parameter type mismatches.

To match the corresponding callback function prototype
(e.g. CANetworkPacketReceivedCallback and CAErrorHandleCallback), the
data length parameter for a few callback function implementations
should have been of type size_t instead uint32_t.  This addresses
several parameter type mismatch warnings on 64 bit platforms.

Change-Id: Iaa5740a9fdb9d59fa13832eb3b87335d3355bd37
Signed-off-by: default avatarOssama Othman <ossama.othman@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14237Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarDan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: default avatarZiran Sun <ziran.sun@samsung.com>
Reviewed-by: default avatarMike Fenelon <mike.fenelon@microsoft.com>
parent f7d2362a
......@@ -191,7 +191,7 @@ CAResult_t CAGetInfoFromPDU(const coap_pdu_t *pdu, const CAEndpoint_t *endpoint,
* @param[in] endpoint endpoint information.
* @return coap_pdu_t value.
*/
coap_pdu_t *CAParsePDU(const char *data, uint32_t length, uint32_t *outCode,
coap_pdu_t *CAParsePDU(const char *data, size_t length, uint32_t *outCode,
const CAEndpoint_t *endpoint);
/**
......
......@@ -215,7 +215,7 @@ CAResult_t CASetAdapterRAInfo(const CARAInfo_t *caraInfo)
#endif
static void CAReceivedPacketCallback(const CASecureEndpoint_t *sep,
const void *data, uint32_t dataLen)
const void *data, size_t dataLen)
{
if (g_networkPacketReceivedCallback != NULL)
{
......@@ -265,7 +265,7 @@ static void CAConnectionChangedCallback(const CAEndpoint_t *info, bool isConnect
#endif
static void CAAdapterErrorHandleCallback(const CAEndpoint_t *endpoint,
const void *data, uint32_t dataLen,
const void *data, size_t dataLen,
CAResult_t result)
{
OIC_LOG(DEBUG, TAG, "received error from adapter in interfacecontroller");
......
......@@ -72,7 +72,7 @@ static CAErrorCallback g_errorHandler = NULL;
static CANetworkMonitorCallback g_nwMonitorHandler = NULL;
static void CAErrorHandler(const CAEndpoint_t *endpoint,
const void *data, uint32_t dataLen,
const void *data, size_t dataLen,
CAResult_t result);
static CAData_t* CAGenerateHandlerData(const CAEndpoint_t *endpoint,
......@@ -728,7 +728,7 @@ static bool CADropSecondMessage(CAHistory_t *history, const CAEndpoint_t *ep, ui
}
static void CAReceivedPacketCallback(const CASecureEndpoint_t *sep,
const void *data, uint32_t dataLen)
const void *data, size_t dataLen)
{
VERIFY_NON_NULL_VOID(sep, TAG, "remoteEndpoint");
VERIFY_NON_NULL_VOID(data, TAG, "data");
......@@ -1282,7 +1282,7 @@ static void CALogPayloadInfo(CAInfo_t *info)
}
void CAErrorHandler(const CAEndpoint_t *endpoint,
const void *data, uint32_t dataLen,
const void *data, size_t dataLen,
CAResult_t result)
{
OIC_LOG(DEBUG, TAG, "CAErrorHandler IN");
......
......@@ -179,7 +179,7 @@ coap_pdu_t *CAGeneratePDU(uint32_t code, const CAInfo_t *info, const CAEndpoint_
return pdu;
}
coap_pdu_t *CAParsePDU(const char *data, uint32_t length, uint32_t *outCode,
coap_pdu_t *CAParsePDU(const char *data, size_t length, uint32_t *outCode,
const CAEndpoint_t *endpoint)
{
VERIFY_NON_NULL_RET(data, TAG, "data", NULL);
......@@ -193,7 +193,8 @@ coap_pdu_t *CAParsePDU(const char *data, uint32_t length, uint32_t *outCode,
}
#endif
coap_pdu_t *outpdu = coap_new_pdu2(transport, length);
coap_pdu_t *outpdu =
coap_pdu_init2(0, 0, ntohs(COAP_INVALID_TID), length, transport);
if (NULL == outpdu)
{
OIC_LOG(ERROR, TAG, "outpdu is null");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment