#include "caqueueingthread.h"
#endif
#if defined(__TIZEN__) || defined(__ANDROID__)
+#include "pthread.h"
#include "caleserver.h"
#include "caleclient.h"
#endif
if (CA_STATUS_OK != result)
{
OIC_LOG(ERROR, CALEADAPTER_TAG, "CAInitBleServerSenderQueue failed");
-
+
return CA_STATUS_FAILED;
}
}
}
-
+
if (NULL == g_bleServerReceiveDataMutex)
{
oc_mutex_free(g_bleIsServerMutex);
g_bleIsServerMutex = NULL;
-
+
oc_mutex_free(g_bleLocalAddressMutex);
g_bleLocalAddressMutex = NULL;
CAStopLEGattClient();
CAResult_t result = CAQueueingThreadStop(g_bleClientSendQueueHandle);
-
+
return result;
#else
CAStopLEGattClient();
VERIFY_NON_NULL_RET(g_bleClientSendQueueHandle, CALEADAPTER_TAG,
"g_bleClientSendQueueHandle is NULL",
CA_STATUS_FAILED);
-
+
OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Data Sending to LE layer [%u]", dataLen);
CALEData_t *bleData = CACreateLEData(remoteEndpoint, data, dataLen, NULL);
return CA_MEMORY_ALLOC_FAILED;
}
// Add message to send queue
-
+
CAResult_t res = CAQueueingThreadAddData(g_bleClientSendQueueHandle, bleData,
sizeof(CALEData_t));
if (CA_STATUS_OK != res)
}
// Add message to send queue
-
+
CAResult_t res = CAQueueingThreadAddData(g_bleServerSendQueueHandle,
bleData,
sizeof(CALEData_t));
static void CASetLEAdapterThreadPoolHandle(ca_thread_pool_t handle)
{
g_bleAdapterThreadPool = handle;
-
+
}
static void CASetLEReqRespAdapterCallback(CANetworkPacketReceivedCallback callback)
address);
if (CA_STATUS_OK != res)
{
-
+
OIC_LOG(ERROR, CALEADAPTER_TAG, "Could not clear the send queue");
}
-
+
}
static void CALERemoveReceiveQueueData(u_arraylist_t *dataInfoList, const char* address)