void CAFreeLEData(CALEData_t *bleData)
{
- VERIFY_NON_NULL_VOID(bleData, NULL, "Param bleData is NULL");
+ VERIFY_NON_NULL_VOID(bleData, CALEADAPTER_TAG, "Param bleData is NULL");
CAFreeEndpoint(bleData->remoteEndpoint);
OICFree(bleData->data);
OIC_LOG(DEBUG, CALEADAPTER_TAG, "IN");
//Input validation
- VERIFY_NON_NULL(registerCallback, NULL, "RegisterConnectivity callback is null");
- VERIFY_NON_NULL(reqRespCallback, NULL, "PacketReceived Callback is null");
- VERIFY_NON_NULL(netCallback, NULL, "NetworkChange Callback is null");
+ VERIFY_NON_NULL(registerCallback, CALEADAPTER_TAG, "RegisterConnectivity callback is null");
+ VERIFY_NON_NULL(reqRespCallback, CALEADAPTER_TAG, "PacketReceived Callback is null");
+ VERIFY_NON_NULL(netCallback, CALEADAPTER_TAG, "NetworkChange Callback is null");
CAResult_t result = CA_STATUS_OK;
result = CAInitLEAdapterMutex();
OIC_LOG(DEBUG, CALEADAPTER_TAG, "IN");
//Input validation
- VERIFY_NON_NULL_RET(endpoint, NULL, "Remote endpoint is null", -1);
- VERIFY_NON_NULL_RET(data, NULL, "Data is null", -1);
+ VERIFY_NON_NULL_RET(endpoint, CALEADAPTER_TAG, "Remote endpoint is null", -1);
+ VERIFY_NON_NULL_RET(data, CALEADAPTER_TAG, "Data is null", -1);
CAResult_t result = CA_STATUS_FAILED;
OIC_LOG(DEBUG, CALEADAPTER_TAG, "IN");
//Input validation
- VERIFY_NON_NULL_RET(data, NULL, "Data is null", -1);
+ VERIFY_NON_NULL_RET(data, CALEADAPTER_TAG, "Data is null", -1);
if (0 >= dataLen)
{
{
OIC_LOG(DEBUG, CALEADAPTER_TAG, "IN");
- VERIFY_NON_NULL(info, NULL, "CALocalConnectivity info is null");
+ VERIFY_NON_NULL(info, CALEADAPTER_TAG, "CALocalConnectivity info is null");
char *local_address = NULL;
{
OIC_LOG(DEBUG, CALEADAPTER_TAG, "IN");
- VERIFY_NON_NULL_VOID(g_localBLEAddress, NULL, "g_localBLEAddress is null");
+ VERIFY_NON_NULL_VOID(g_localBLEAddress, CALEADAPTER_TAG, "g_localBLEAddress is null");
CAEndpoint_t localEndpoint = {};
ca_mutex_lock(g_bleLocalAddressMutex);
{
OIC_LOG(DEBUG, CALEADAPTER_TAG, "IN");
- VERIFY_NON_NULL(data, NULL, "Param data is NULL");
+ VERIFY_NON_NULL(data, CALEADAPTER_TAG, "Param data is NULL");
#ifndef SINGLE_THREAD
VERIFY_NON_NULL_RET(g_bleClientSendQueueHandle, CALEADAPTER_TAG,
"g_bleClientSendQueueHandle is NULL",
{
OIC_LOG(DEBUG, CALEADAPTER_TAG, "IN");
- VERIFY_NON_NULL(data, NULL, "Param data is NULL");
+ VERIFY_NON_NULL(data, CALEADAPTER_TAG, "Param data is NULL");
#ifdef SINGLE_THREAD
char header[CA_HEADER_LENGTH] = {0};
{
OIC_LOG(DEBUG, TZ_BLE_CLIENT_TAG, "IN");
- VERIFY_NON_NULL_RET(service, NULL, "service is NULL", CA_STATUS_FAILED);
+ VERIFY_NON_NULL_RET(service, TZ_BLE_CLIENT_TAG, "service is NULL", CA_STATUS_FAILED);
- VERIFY_NON_NULL_RET(remoteAddress, NULL, "remoteAddress is NULL", CA_STATUS_FAILED);
+ VERIFY_NON_NULL_RET(remoteAddress, TZ_BLE_CLIENT_TAG, "remoteAddress is NULL", CA_STATUS_FAILED);
char *addr = OICStrdup(remoteAddress);
VERIFY_NON_NULL_RET(addr, TZ_BLE_CLIENT_TAG, "Malloc failed", CA_STATUS_FAILED);
{
OIC_LOG(DEBUG, TZ_BLE_CLIENT_TAG, "IN");
- VERIFY_NON_NULL_RET(service, NULL, "service is NULL", CA_STATUS_FAILED);
+ VERIFY_NON_NULL_RET(service, TZ_BLE_CLIENT_TAG, "service is NULL", CA_STATUS_FAILED);
int ret = bt_gatt_discover_characteristic_descriptor(service,
CABleGattDescriptorDiscoveredCb, NULL);
{
OIC_LOG(DEBUG, TZ_BLE_CLIENT_TAG, "IN");
- VERIFY_NON_NULL(data, NULL, "data is NULL");
+ VERIFY_NON_NULL(data, TZ_BLE_CLIENT_TAG, "data is NULL");
if (0 >= dataLen)
{
ca_mutex_lock(g_bleServiceListMutex);
if ( LE_UNICAST == type)
{
- VERIFY_NON_NULL(remoteAddress, NULL, "remoteAddress is NULL");
+ VERIFY_NON_NULL(remoteAddress, TZ_BLE_CLIENT_TAG, "remoteAddress is NULL");
ret = CAGetBLEServiceInfo(g_bLEServiceList, remoteAddress, &bleServiceInfo);
}
return CA_STATUS_FAILED;
}
- VERIFY_NON_NULL(bleServiceInfo, NULL, "bleServiceInfo is NULL");
+ VERIFY_NON_NULL(bleServiceInfo, TZ_BLE_CLIENT_TAG, "bleServiceInfo is NULL");
OIC_LOG_V(DEBUG, TZ_BLE_CLIENT_TAG, "Updating the data of length [%d] to [%s] ", dataLen,
bleServiceInfo->bdAddress);
{
OIC_LOG(DEBUG, TZ_BLE_CLIENT_TAG, "IN");
- VERIFY_NON_NULL(data, NULL, "data is NULL");
+ VERIFY_NON_NULL(data, TZ_BLE_CLIENT_TAG, "data is NULL");
if (0 >= dataLen)
{
{
OIC_LOG(DEBUG, TZ_BLE_SERVER_TAG, "IN");
- VERIFY_NON_NULL(serviceUUID, NULL, "Param serviceUUID is NULL");
+ VERIFY_NON_NULL(serviceUUID, TZ_BLE_SERVER_TAG, "Param serviceUUID is NULL");
OIC_LOG_V(DEBUG, TZ_BLE_SERVER_TAG, "service uuid %s", serviceUUID);
{
OIC_LOG(DEBUG, TZ_BLE_SERVER_TAG, "IN");
- VERIFY_NON_NULL(svcPath, NULL, "Param svcPath is NULL");
+ VERIFY_NON_NULL(svcPath, TZ_BLE_SERVER_TAG, "Param svcPath is NULL");
int ret = bt_gatt_remove_service(svcPath);
{
OIC_LOG(DEBUG, TZ_BLE_SERVER_TAG, "IN");
- VERIFY_NON_NULL(svcPath, NULL, "Param svcPath is NULL");
+ VERIFY_NON_NULL(svcPath, TZ_BLE_SERVER_TAG, "Param svcPath is NULL");
OIC_LOG_V(DEBUG, TZ_BLE_SERVER_TAG, "svcPath:%s", svcPath);
{
OIC_LOG(DEBUG, TZ_BLE_SERVER_TAG, "IN");
- VERIFY_NON_NULL(charValue, NULL, "Param charValue is NULL");
+ VERIFY_NON_NULL(charValue, TZ_BLE_SERVER_TAG, "Param charValue is NULL");
- VERIFY_NON_NULL(address, NULL, "Param address is NULL");
+ VERIFY_NON_NULL(address, TZ_BLE_SERVER_TAG, "Param address is NULL");
OIC_LOG_V(DEBUG, TZ_BLE_SERVER_TAG, "Client's Unicast address for sending data [%s]", address);
{
OIC_LOG(DEBUG, TZ_BLE_SERVER_TAG, "IN");
- VERIFY_NON_NULL(charValue, NULL, "Param charValue is NULL");
+ VERIFY_NON_NULL(charValue, TZ_BLE_SERVER_TAG, "Param charValue is NULL");
ca_mutex_lock(g_bleCharacteristicMutex);
{
OIC_LOG(DEBUG, TZ_BLE_CLIENT_UTIL_TAG, "IN");
- VERIFY_NON_NULL(bdAddress, NULL, "Param bdAddress is NULL");
- VERIFY_NON_NULL(service, NULL, "Param service is NULL");
- VERIFY_NON_NULL(bleServiceInfo, NULL, "Param bleServiceInfo is NULL");
+ VERIFY_NON_NULL(bdAddress, TZ_BLE_CLIENT_UTIL_TAG, "Param bdAddress is NULL");
+ VERIFY_NON_NULL(service, TZ_BLE_CLIENT_UTIL_TAG, "Param service is NULL");
+ VERIFY_NON_NULL(bleServiceInfo, TZ_BLE_CLIENT_UTIL_TAG, "Param bleServiceInfo is NULL");
*bleServiceInfo = (BLEServiceInfo *) OICCalloc(1, sizeof(BLEServiceInfo));
if (NULL == *bleServiceInfo)
{
OIC_LOG(DEBUG, TZ_BLE_CLIENT_UTIL_TAG, "IN");
- VERIFY_NON_NULL(characteristic, NULL, "Param characteristic is NULL");
- VERIFY_NON_NULL(bleServiceInfo, NULL, "Param bleServiceInfo is NULL");
+ VERIFY_NON_NULL(characteristic, TZ_BLE_CLIENT_UTIL_TAG, "Param characteristic is NULL");
+ VERIFY_NON_NULL(bleServiceInfo, TZ_BLE_CLIENT_UTIL_TAG, "Param bleServiceInfo is NULL");
if (BLE_GATT_READ_CHAR == type )
{
OIC_LOG(DEBUG, TZ_BLE_CLIENT_UTIL_TAG, "IN");
- VERIFY_NON_NULL(serviceList, NULL, "Param serviceList is NULL");
- VERIFY_NON_NULL(bleServiceInfo, NULL, "Param bleServiceInfo is NULL");
+ VERIFY_NON_NULL(serviceList, TZ_BLE_CLIENT_UTIL_TAG, "Param serviceList is NULL");
+ VERIFY_NON_NULL(bleServiceInfo, TZ_BLE_CLIENT_UTIL_TAG, "Param bleServiceInfo is NULL");
BLEServiceList *node = (BLEServiceList *) OICCalloc(1, sizeof(BLEServiceList));
if (NULL == node)
OIC_LOG(DEBUG, TZ_BLE_CLIENT_UTIL_TAG, "IN");
- VERIFY_NON_NULL(serviceList, NULL, "Param serviceList is NULL");
- VERIFY_NON_NULL(*serviceList, NULL, "Param *serviceList is NULL");
- VERIFY_NON_NULL(bdAddress, NULL, "Param bdAddress is NULL");
+ VERIFY_NON_NULL(serviceList, TZ_BLE_CLIENT_UTIL_TAG, "Param serviceList is NULL");
+ VERIFY_NON_NULL(*serviceList, TZ_BLE_CLIENT_UTIL_TAG, "Param *serviceList is NULL");
+ VERIFY_NON_NULL(bdAddress, TZ_BLE_CLIENT_UTIL_TAG, "Param bdAddress is NULL");
BLEServiceList *prev = NULL;
BLEServiceList *cur = *serviceList;
OIC_LOG(DEBUG, TZ_BLE_CLIENT_UTIL_TAG, "IN");
- VERIFY_NON_NULL(serviceList, NULL, "Param serviceList is NULL");
- VERIFY_NON_NULL(bleServiceInfo, NULL, "Param bleServiceInfo is NULL");
- VERIFY_NON_NULL(bdAddress, NULL, "Param bdAddress is NULL");
+ VERIFY_NON_NULL(serviceList, TZ_BLE_CLIENT_UTIL_TAG, "Param serviceList is NULL");
+ VERIFY_NON_NULL(bleServiceInfo, TZ_BLE_CLIENT_UTIL_TAG, "Param bleServiceInfo is NULL");
+ VERIFY_NON_NULL(bdAddress, TZ_BLE_CLIENT_UTIL_TAG, "Param bdAddress is NULL");
BLEServiceList *cur = serviceList;
{
OIC_LOG(DEBUG, TZ_BLE_CLIENT_UTIL_TAG, "IN");
- VERIFY_NON_NULL(serviceList, NULL, "Param serviceList is NULL");
- VERIFY_NON_NULL(bleServiceInfo, NULL, "Param bleServiceInfo is NULL");
+ VERIFY_NON_NULL(serviceList, TZ_BLE_CLIENT_UTIL_TAG, "Param serviceList is NULL");
+ VERIFY_NON_NULL(bleServiceInfo, TZ_BLE_CLIENT_UTIL_TAG, "Param bleServiceInfo is NULL");
if (0 > position)
{
{
OIC_LOG(DEBUG, TZ_BLE_CLIENT_UTIL_TAG, "IN");
- VERIFY_NON_NULL(serviceUUID, NULL, "Param serviceHandle is NULL");
+ VERIFY_NON_NULL(serviceUUID, TZ_BLE_CLIENT_UTIL_TAG, "Param serviceHandle is NULL");
if (strcasecmp(serviceUUID, OIC_BLE_SERVICE_ID) != 0)
{
{
OIC_LOG(DEBUG, TZ_BLE_CLIENT_UTIL_TAG, "IN");
- VERIFY_NON_NULL(serviceHandle, NULL, "Param serviceHandle is NULL");
+ VERIFY_NON_NULL(serviceHandle, TZ_BLE_CLIENT_UTIL_TAG, "Param serviceHandle is NULL");
char *uuid = NULL;
int ret = bt_gatt_get_service_uuid(serviceHandle, &uuid);