X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Fsrc%2Fnfc_adapter%2Fcanfcadapter.c;h=7f77e697b0ac2c4155b500fc5cc4090f5dd6fa12;hb=7f00f942c39b7bc27c7eeecf213a239c3fe4173c;hp=4f8e57e050fc2abc30e49d0e2f8496a3aae2f5f7;hpb=6dc5c6adbc159bbeb11ef6a387ad39dfbd0d3d52;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/src/nfc_adapter/canfcadapter.c b/resource/csdk/connectivity/src/nfc_adapter/canfcadapter.c index 4f8e57e..7f77e69 100644 --- a/resource/csdk/connectivity/src/nfc_adapter/canfcadapter.c +++ b/resource/csdk/connectivity/src/nfc_adapter/canfcadapter.c @@ -19,7 +19,7 @@ #include "canfcinterface.h" #include "caqueueingthread.h" #include "caadapterutils.h" -#include "camutex.h" +#include "octhread.h" #include "uarraylist.h" #include "caremotehandler.h" #include "logger.h" @@ -67,8 +67,8 @@ static CAAdapterChangeCallback g_adapterStateCallback = NULL; */ static CAErrorHandleCallback g_errorCallback = NULL; -static void CANFCPacketReceivedCB(const CASecureEndpoint_t *endpoint, const void *data, - uint32_t dataLength); +static CAResult_t CANFCPacketReceivedCB(const CASecureEndpoint_t *endpoint, + const void *data, uint32_t dataLength); #ifndef SINGLE_THREAD static CAResult_t CANFCInitializeQueueHandles(); @@ -137,17 +137,18 @@ void CANFCConnectionStateCB(const char *nfcAddress, CANetworkStatus_t status) (void)status; } -void CANFCPacketReceivedCB(const CASecureEndpoint_t *sep, const void *data, uint32_t dataLength) +CAResult_t CANFCPacketReceivedCB(const CASecureEndpoint_t *sep, const void *data, + uint32_t dataLength) { OIC_LOG(DEBUG, TAG, "IN"); - VERIFY_NON_NULL_VOID(sep, TAG, "endpoint is NULL"); - VERIFY_NON_NULL_VOID(data, TAG, "data is NULL"); + VERIFY_NON_NULL(sep, TAG, "endpoint is NULL"); + VERIFY_NON_NULL(data, TAG, "data is NULL"); if (0 == dataLength) { OIC_LOG(ERROR, TAG, "Invalid call, data length is 0"); - return; + return CA_STATUS_FAILED; } OIC_LOG_V(DEBUG, TAG, "Address: %s, port:%d", sep->endpoint.addr, sep->endpoint.port); @@ -158,6 +159,8 @@ void CANFCPacketReceivedCB(const CASecureEndpoint_t *sep, const void *data, uint } OIC_LOG(DEBUG, TAG, "OUT"); + + return CA_STATUS_OK; } void CANFCErrorHandler(const CAEndpoint_t *endpoint, const void *data, uint32_t dataLength,