Fix incorrect usages of OIC_LOG_V macro.
authorDoug Hudson <douglas.hudson@intel.com>
Tue, 7 Apr 2015 19:58:24 +0000 (15:58 -0400)
committerErich Keane <erich.keane@intel.com>
Tue, 7 Apr 2015 21:18:47 +0000 (21:18 +0000)
The OIC_LOG_V macro is intended to be used for variadic log messages.
This macro was used in many cases for non-variadic messages.  In these
cases, OIC_LOG_V was replaced with OIC_LOG.

Change-Id: I8a2c9319da495fc89d73146c3b57e67f64a60340
Signed-off-by: Doug Hudson <douglas.hudson@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/667
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
36 files changed:
resource/csdk/connectivity/common/src/umutex.c
resource/csdk/connectivity/src/bt_edr_adapter/android/caedrclient.c
resource/csdk/connectivity/src/bt_edr_adapter/android/caedrnwmonitor.c
resource/csdk/connectivity/src/bt_edr_adapter/android/caedrserver.c
resource/csdk/connectivity/src/bt_edr_adapter/android/caedrutils.c
resource/csdk/connectivity/src/bt_edr_adapter/caedradapter.c
resource/csdk/connectivity/src/bt_edr_adapter/linux/caedradapter.c
resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrclient.c
resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrdevicelist.c
resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrendpoint.c
resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrnwmonitor.c
resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrserver.c
resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrutils.c
resource/csdk/connectivity/src/bt_le_adapter/android/caleadapter.c
resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.c
resource/csdk/connectivity/src/bt_le_adapter/android/calenwmonitor.c
resource/csdk/connectivity/src/bt_le_adapter/android/caleserver.c
resource/csdk/connectivity/src/bt_le_adapter/android/caleutils.c
resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c
resource/csdk/connectivity/src/bt_le_adapter/linux/caleadapter.c
resource/csdk/connectivity/src/bt_le_adapter/tizen/cableclient.c
resource/csdk/connectivity/src/bt_le_adapter/tizen/cablenwmonitor.c
resource/csdk/connectivity/src/bt_le_adapter/tizen/cableserver.c
resource/csdk/connectivity/src/caconnectivitymanager.c
resource/csdk/connectivity/src/cainterfacecontroller.c
resource/csdk/connectivity/src/caretransmission.c
resource/csdk/connectivity/src/ethernet_adapter/caethernetadapter.c
resource/csdk/connectivity/src/ethernet_adapter/linux/caethernetnwmonitor.c
resource/csdk/connectivity/src/ethernet_adapter/linux/caethernetserver.c
resource/csdk/connectivity/src/wifi_adapter/android/cawifinwmonitor.c
resource/csdk/connectivity/src/wifi_adapter/android/cawifiserver.c
resource/csdk/connectivity/src/wifi_adapter/cawifiadapter.c
resource/csdk/connectivity/src/wifi_adapter/linux/cawifinwmonitor.c
resource/csdk/connectivity/src/wifi_adapter/linux/cawifiserver.c
resource/csdk/connectivity/src/wifi_adapter/tizen/cawifinwmonitor.c
resource/csdk/connectivity/src/wifi_adapter/tizen/cawifiserver.c

index 8a48f29..14cf467 100644 (file)
@@ -45,7 +45,7 @@ void u_mutex_lock(u_mutex mutex)
 {
     if (NULL == mutex)
     {
-        OIC_LOG_V(ERROR, TAG , "u_mutex_lock, Invalid mutex !");
+        OIC_LOG(ERROR, TAG , "u_mutex_lock, Invalid mutex !");
         return;
     }
 
@@ -57,7 +57,7 @@ bool u_mutex_trylock(u_mutex mutex)
 {
     if (NULL == mutex)
     {
-        OIC_LOG_V(ERROR, TAG, "u_mutex_trylock, Invalid mutex !");
+        OIC_LOG(ERROR, TAG, "u_mutex_trylock, Invalid mutex !");
         return false;
     }
 
@@ -70,7 +70,7 @@ void u_mutex_unlock(u_mutex mutex)
 {
     if (NULL == mutex)
     {
-        OIC_LOG_V(ERROR, TAG, "u_mutex_unlock, Invalid mutex !");
+        OIC_LOG(ERROR, TAG, "u_mutex_unlock, Invalid mutex !");
         return;
     }
 
@@ -82,7 +82,7 @@ void u_mutex_free(u_mutex mutex)
 {
     if (NULL == mutex)
     {
-        OIC_LOG_V(ERROR, TAG, "u_mutex_free, Invalid mutex !");
+        OIC_LOG(ERROR, TAG, "u_mutex_free, Invalid mutex !");
         return;
     }
 
@@ -102,7 +102,7 @@ void u_cond_signal(u_cond cond)
 {
     if (NULL == cond)
     {
-        OIC_LOG_V(ERROR, TAG, "u_cond_signal, Invalid condition !");
+        OIC_LOG(ERROR, TAG, "u_cond_signal, Invalid condition !");
         return;
     }
 
@@ -114,7 +114,7 @@ void u_cond_broadcast(u_cond cond)
 {
     if (NULL == cond)
     {
-        OIC_LOG_V(ERROR, TAG, "u_cond_broadcast, Invalid condition !");
+        OIC_LOG(ERROR, TAG, "u_cond_broadcast, Invalid condition !");
         return;
     }
 
@@ -126,13 +126,13 @@ void u_cond_wait(u_cond cond, u_mutex mutex)
 {
     if (NULL == mutex)
     {
-        OIC_LOG_V(ERROR, TAG, "u_cond_wait, Invalid mutex !");
+        OIC_LOG(ERROR, TAG, "u_cond_wait, Invalid mutex !");
         return;
     }
 
     if (NULL == cond)
     {
-        OIC_LOG_V(ERROR, TAG, "u_cond_wait, Invalid condition !");
+        OIC_LOG(ERROR, TAG, "u_cond_wait, Invalid condition !");
         return;
     }
 
@@ -145,13 +145,13 @@ void u_cond_wait_until(u_cond cond, u_mutex mutex, int32_t microseconds)
 {
     if (NULL == mutex)
     {
-        OIC_LOG_V(ERROR, TAG, "u_cond_wait, Invalid mutex !");
+        OIC_LOG(ERROR, TAG, "u_cond_wait, Invalid mutex !");
         return;
     }
 
     if (NULL == cond)
     {
-        OIC_LOG_V(ERROR, TAG, "u_cond_wait, Invalid condition !");
+        OIC_LOG(ERROR, TAG, "u_cond_wait, Invalid condition !");
         return;
     }
 
@@ -174,7 +174,7 @@ void u_cond_free(u_cond cond)
 {
     if (NULL == cond)
     {
-        OIC_LOG_V(ERROR, TAG, "u_cond_free, Invalid condition !");
+        OIC_LOG(ERROR, TAG, "u_cond_free, Invalid condition !");
         return;
     }
 
index 676eb94..25fe644 100644 (file)
@@ -116,9 +116,9 @@ typedef struct
 // TODO: It will be updated when android EDR support is added
 CAResult_t CAEDRGetInterfaceInformation(CALocalConnectivity_t **info)
 {
-    OIC_LOG_V(DEBUG, TAG, "IN");
+    OIC_LOG(DEBUG, TAG, "IN");
 
-    OIC_LOG_V(DEBUG, TAG, "OUT");
+    OIC_LOG(DEBUG, TAG, "OUT");
     return CA_STATUS_OK;
 }
 
@@ -131,17 +131,17 @@ void CAEDRClientTerminate()
 
 CAResult_t CAEDRManagerReadData(void)
 {
-    OIC_LOG_V(DEBUG, TAG, "IN");
-    OIC_LOG_V(DEBUG, TAG, "OUT");
+    OIC_LOG(DEBUG, TAG, "IN");
+    OIC_LOG(DEBUG, TAG, "OUT");
     return CA_NOT_SUPPORTED;
 }
 
 CAResult_t CAEDRClientSendUnicastData(const char *remoteAddress, const char *serviceUUID,
                                       const void *data, uint32_t dataLength, uint32_t *sentLength)
 {
-    OIC_LOG_V(DEBUG, TAG, "IN");
+    OIC_LOG(DEBUG, TAG, "IN");
     CAEDRSendUnicastMessage(remoteAddress, (const char*) data, dataLength);
-    OIC_LOG_V(DEBUG, TAG, "OUT");
+    OIC_LOG(DEBUG, TAG, "OUT");
     return CA_STATUS_OK;
 }
 
@@ -149,34 +149,34 @@ CAResult_t CAEDRClientSendUnicastData(const char *remoteAddress, const char *ser
 CAResult_t CAEDRClientSendMulticastData(const char *serviceUUID, const void *data,
                                         uint32_t dataLength, uint32_t *sentLength)
 {
-    OIC_LOG_V(DEBUG, TAG, "IN");
+    OIC_LOG(DEBUG, TAG, "IN");
     CAEDRSendMulticastMessage((const char*) data, dataLength);
-    OIC_LOG_V(DEBUG, TAG, "OUT");
+    OIC_LOG(DEBUG, TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 // TODO: It will be updated when android EDR support is added
 void CAEDRClientUnsetCallbacks(void)
 {
-    OIC_LOG_V(DEBUG, TAG, "IN");
+    OIC_LOG(DEBUG, TAG, "IN");
 
-    OIC_LOG_V(DEBUG, TAG, "OUT");
+    OIC_LOG(DEBUG, TAG, "OUT");
 }
 
 // TODO: It will be updated when android EDR support is added
 void CAEDRClientDisconnectAll(void)
 {
-    OIC_LOG_V(DEBUG, TAG, "IN");
+    OIC_LOG(DEBUG, TAG, "IN");
 
-    OIC_LOG_V(DEBUG, TAG, "OUT");
+    OIC_LOG(DEBUG, TAG, "OUT");
 }
 
 CAResult_t CAEDRGetAdapterEnableState(bool *state)
 {
-    OIC_LOG_V(DEBUG, TAG, "IN");
+    OIC_LOG(DEBUG, TAG, "IN");
     if (!g_jvm)
     {
-        OIC_LOG_V(ERROR, TAG, "g_jvm is null");
+        OIC_LOG(ERROR, TAG, "g_jvm is null");
         return CA_STATUS_INVALID_PARAM;
     }
     jboolean isAttached = JNI_FALSE;
@@ -184,12 +184,12 @@ CAResult_t CAEDRGetAdapterEnableState(bool *state)
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**)&env, JNI_VERSION_1_6);
     if(res != JNI_OK)
     {
-        OIC_LOG_V(DEBUG, TAG, "CAEDRGetAdapterEnableState - Could not get JNIEnv pointer");
+        OIC_LOG(DEBUG, TAG, "CAEDRGetAdapterEnableState - Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if(res != JNI_OK)
         {
-            OIC_LOG_V(DEBUG, TAG, "AttachCurrentThread failed");
+            OIC_LOG(DEBUG, TAG, "AttachCurrentThread failed");
             return CA_STATUS_INVALID_PARAM;
         }
         isAttached = JNI_TRUE;
@@ -207,7 +207,7 @@ CAResult_t CAEDRGetAdapterEnableState(bool *state)
     if(isAttached)
         (*g_jvm)->DetachCurrentThread(g_jvm);
 
-    OIC_LOG_V(DEBUG, TAG, "OUT");
+    OIC_LOG(DEBUG, TAG, "OUT");
     return CA_STATUS_OK;
 }
 
@@ -216,11 +216,11 @@ CAResult_t CAEDRGetAdapterEnableState(bool *state)
 
 void CAEDRJniSetContext(jobject context)
 {
-    OIC_LOG_V(DEBUG, TAG, "caedrSetObject");
+    OIC_LOG(DEBUG, TAG, "caedrSetObject");
 
     if (!context)
     {
-        OIC_LOG_V(ERROR, TAG, "context is null");
+        OIC_LOG(ERROR, TAG, "context is null");
         return;
     }
     jboolean isAttached = JNI_FALSE;
@@ -228,12 +228,12 @@ void CAEDRJniSetContext(jobject context)
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**)&env, JNI_VERSION_1_6);
     if(res != JNI_OK)
     {
-        OIC_LOG_V(DEBUG, TAG, "CAEDRInitialize - Could not get JNIEnv pointer");
+        OIC_LOG(DEBUG, TAG, "CAEDRInitialize - Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if(res != JNI_OK)
         {
-            OIC_LOG_V(DEBUG, TAG, "AttachCurrentThread failed");
+            OIC_LOG(DEBUG, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = JNI_TRUE;
@@ -248,11 +248,11 @@ void CAEDRJniSetContext(jobject context)
 void CAEDRCreateJNIInterfaceObject(jobject context)
 {
     JNIEnv* env;
-    OIC_LOG_V(DEBUG, TAG, "[EDRCore] CAEDRCreateJNIInterfaceObject");
+    OIC_LOG(DEBUG, TAG, "[EDRCore] CAEDRCreateJNIInterfaceObject");
 
     if ((*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6) != JNI_OK)
     {
-        OIC_LOG_V(DEBUG, TAG, "[EDRCore] Could not get JNIEnv pointer");
+        OIC_LOG(DEBUG, TAG, "[EDRCore] Could not get JNIEnv pointer");
         return;
     }
 
@@ -260,7 +260,7 @@ void CAEDRCreateJNIInterfaceObject(jobject context)
     jclass contextClass = (*env)->FindClass(env, "android/content/Context");
     if (contextClass == 0)
     {
-        OIC_LOG_V(DEBUG, TAG, "[EDRCore] Could not get context object class");
+        OIC_LOG(DEBUG, TAG, "[EDRCore] Could not get context object class");
         return;
     }
 
@@ -268,7 +268,7 @@ void CAEDRCreateJNIInterfaceObject(jobject context)
             "getApplicationContext", "()Landroid/content/Context;");
     if (getApplicationContextMethod == 0)
     {
-        OIC_LOG_V(DEBUG, TAG, "[EDRCore] Could not get getApplicationContext method");
+        OIC_LOG(DEBUG, TAG, "[EDRCore] Could not get getApplicationContext method");
         return;
     }
 
@@ -281,7 +281,7 @@ void CAEDRCreateJNIInterfaceObject(jobject context)
     jclass WiFiJniInterface = (*env)->FindClass(env, "com/iotivity/jar/CAEDRInterface");
     if (!WiFiJniInterface)
     {
-        OIC_LOG_V(DEBUG, TAG, "[EDRCore] Could not get CAWiFiInterface class");
+        OIC_LOG(DEBUG, TAG, "[EDRCore] Could not get CAWiFiInterface class");
         return;
     }
 
@@ -289,13 +289,13 @@ void CAEDRCreateJNIInterfaceObject(jobject context)
             WiFiJniInterface, "<init>", "(Landroid/content/Context;)V");
     if (!WiFiInterfaceConstructorMethod)
     {
-        OIC_LOG_V(ERROR, TAG, "[EDRCore] Could not get CAWiFiInterface constructor method");
+        OIC_LOG(ERROR, TAG, "[EDRCore] Could not get CAWiFiInterface constructor method");
         return;
     }
 
     (*env)->NewObject(env, WiFiJniInterface, WiFiInterfaceConstructorMethod, gApplicationContext);
-    OIC_LOG_V(DEBUG, TAG, "[EDRCore] Create CAWiFiInterface instance");
-    OIC_LOG_V(DEBUG, TAG, "[EDRCore] NewObject Success");
+    OIC_LOG(DEBUG, TAG, "[EDRCore] Create CAWiFiInterface instance");
+    OIC_LOG(DEBUG, TAG, "[EDRCore] NewObject Success");
 
 }
 
@@ -371,12 +371,12 @@ void CAEDRInitialize(u_thread_pool_t handle)
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**)&env, JNI_VERSION_1_6);
     if(res != JNI_OK)
     {
-        OIC_LOG_V(DEBUG, TAG, "CAEDRInitialize - Could not get JNIEnv pointer");
+        OIC_LOG(DEBUG, TAG, "CAEDRInitialize - Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if(res != JNI_OK)
         {
-            OIC_LOG_V(DEBUG, TAG, "AttachCurrentThread failed");
+            OIC_LOG(DEBUG, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = JNI_TRUE;
@@ -409,12 +409,12 @@ void CAEDRTerminate()
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**)&env, JNI_VERSION_1_6);
     if(res != JNI_OK)
     {
-        OIC_LOG_V(DEBUG, TAG, "CAEDRTerminate - Could not get JNIEnv pointer");
+        OIC_LOG(DEBUG, TAG, "CAEDRTerminate - Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if(res != JNI_OK)
         {
-            OIC_LOG_V(DEBUG, TAG, "AttachCurrentThread failed");
+            OIC_LOG(DEBUG, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = JNI_TRUE;
@@ -440,7 +440,7 @@ void CAEDRTerminate()
 
 void CAEDRCoreJniInit(JNIEnv *env, JavaVM *jvm)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAEdrClientJniInit");
+    OIC_LOG(DEBUG, TAG, "CAEdrClientJniInit");
     g_jvm = jvm;
 
     CAEDRServerJniInit(env, jvm);
@@ -463,12 +463,12 @@ CAResult_t CAEDRSendMulticastMessage(const char* data, uint32_t dataLen)
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**)&env, JNI_VERSION_1_6);
     if(res != JNI_OK)
     {
-        OIC_LOG_V(DEBUG, TAG, "CAEDRSendMulticastMessage - Could not get JNIEnv pointer");
+        OIC_LOG(DEBUG, TAG, "CAEDRSendMulticastMessage - Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if(res != JNI_OK)
         {
-            OIC_LOG_V(DEBUG, TAG, "AttachCurrentThread failed");
+            OIC_LOG(DEBUG, TAG, "AttachCurrentThread failed");
             return CA_STATUS_INVALID_PARAM;
         }
         isAttached = JNI_TRUE;
@@ -476,15 +476,15 @@ CAResult_t CAEDRSendMulticastMessage(const char* data, uint32_t dataLen)
 
     CAEDRSendMulticastMessageImpl(env, data, dataLen);
 
-    OIC_LOG_V(DEBUG, TAG, "sent data");
+    OIC_LOG(DEBUG, TAG, "sent data");
 
     if(isAttached)
     {
-        OIC_LOG_V(DEBUG, TAG, "DetachCurrentThread");
+        OIC_LOG(DEBUG, TAG, "DetachCurrentThread");
         (*g_jvm)->DetachCurrentThread(g_jvm);
     }
 
-    OIC_LOG_V(DEBUG, TAG, "OUT - CAEDRSendMulticastMessage");
+    OIC_LOG(DEBUG, TAG, "OUT - CAEDRSendMulticastMessage");
     return CA_STATUS_OK;
 }
 
@@ -501,11 +501,11 @@ void CAEDRGetLocalAddress(char **address)
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**)&env, JNI_VERSION_1_6);
     if(res != JNI_OK)
     {
-        OIC_LOG_V(DEBUG, TAG, "CAEDRGetLocalAddress - Could not get JNIEnv pointer");
+        OIC_LOG(DEBUG, TAG, "CAEDRGetLocalAddress - Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
         if(res != JNI_OK)
         {
-            OIC_LOG_V(DEBUG, TAG, "AttachCurrentThread failed");
+            OIC_LOG(DEBUG, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = JNI_TRUE;
@@ -540,11 +540,11 @@ CAResult_t CAEDRSendUnicastMessageImpl(const char* address, const char* data,
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**)&env, JNI_VERSION_1_6);
     if(res != JNI_OK)
     {
-        OIC_LOG_V(DEBUG, TAG, "CAEDRSendUnicastMessageImpl - Could not get JNIEnv pointer");
+        OIC_LOG(DEBUG, TAG, "CAEDRSendUnicastMessageImpl - Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
         if(res != JNI_OK)
         {
-            OIC_LOG_V(DEBUG, TAG, "AttachCurrentThread failed");
+            OIC_LOG(DEBUG, TAG, "AttachCurrentThread failed");
             return CA_STATUS_INVALID_PARAM;
         }
         isAttached = TRUE;
@@ -563,7 +563,7 @@ CAResult_t CAEDRSendUnicastMessageImpl(const char* address, const char* data,
     jobjectArray jni_arrayPairedDevices = CAEDRNativeGetBondedDevices(env);
     if(!jni_arrayPairedDevices)
     {
-        OIC_LOG_V(DEBUG, TAG, "[EDR][Native] jni_arrayPairedDevices is empty");
+        OIC_LOG(DEBUG, TAG, "[EDR][Native] jni_arrayPairedDevices is empty");
         if (isAttached)
             (*g_jvm)->DetachCurrentThread(g_jvm);
         return CA_STATUS_INVALID_PARAM;
@@ -573,7 +573,7 @@ CAResult_t CAEDRSendUnicastMessageImpl(const char* address, const char* data,
     jsize i;
     for( i = 0 ; i < length ; i++ )
     {
-        OIC_LOG_V(DEBUG, TAG, "[EDR][Native] start to check device");
+        OIC_LOG(DEBUG, TAG, "[EDR][Native] start to check device");
         // get name, address from BT device
         jobject j_obj_device = (*env)->GetObjectArrayElement(env, jni_arrayPairedDevices, i);
 
@@ -630,7 +630,7 @@ CAResult_t CAEDRSendMulticastMessageImpl(JNIEnv *env, const char* data, uint32_t
     jobjectArray jni_arrayPairedDevices = CAEDRNativeGetBondedDevices(env);
     if(!jni_arrayPairedDevices)
     {
-        OIC_LOG_V(DEBUG, TAG, "[EDR][Native] jni_arrayPairedDevices is empty");
+        OIC_LOG(DEBUG, TAG, "[EDR][Native] jni_arrayPairedDevices is empty");
         return CA_STATUS_INVALID_PARAM;
     }
     // Get information from array of devices
@@ -970,7 +970,7 @@ void CAEDRNativeCreateDeviceStateList()
     // create new object array
     if (g_deviceStateList == NULL)
     {
-        OIC_LOG_V(DEBUG, TAG, "Create device list");
+        OIC_LOG(DEBUG, TAG, "Create device list");
 
         g_deviceStateList = u_arraylist_create();
     }
@@ -1028,7 +1028,7 @@ jboolean CAEDRNativeIsDeviceInList(const char* remoteAddress){
 
         if(!strcmp(remoteAddress, state->address))
         {
-            OIC_LOG_V(DEBUG, TAG, "the device is already set");
+            OIC_LOG(DEBUG, TAG, "the device is already set");
             return JNI_TRUE;
         }
         else
@@ -1037,13 +1037,13 @@ jboolean CAEDRNativeIsDeviceInList(const char* remoteAddress){
         }
     }
 
-    OIC_LOG_V(DEBUG, TAG, "there are no the device in list.");
+    OIC_LOG(DEBUG, TAG, "there are no the device in list.");
     return JNI_FALSE;
 }
 
 void CAEDRNativeRemoveAllDeviceState()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAEDRNativeRemoveAllDevices");
+    OIC_LOG(DEBUG, TAG, "CAEDRNativeRemoveAllDevices");
 
     if(!g_deviceStateList)
     {
@@ -1070,7 +1070,7 @@ void CAEDRNativeRemoveAllDeviceState()
 
 void CAEDRNativeRemoveDevice(const char *remoteAddress)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAEDRNativeRemoveDeviceforStateList");
+    OIC_LOG(DEBUG, TAG, "CAEDRNativeRemoveDeviceforStateList");
 
     if(!g_deviceStateList)
     {
@@ -1106,7 +1106,7 @@ void CAEDRNativeRemoveDevice(const char *remoteAddress)
 
 CAConnectedState_t CAEDRIsConnectedDevice(const char *remoteAddress)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAEDRIsConnectedDevice");
+    OIC_LOG(DEBUG, TAG, "CAEDRIsConnectedDevice");
 
     if(!g_deviceStateList)
     {
@@ -1126,7 +1126,7 @@ CAConnectedState_t CAEDRIsConnectedDevice(const char *remoteAddress)
 
         if(!strcmp(state->address, remoteAddress))
         {
-            OIC_LOG_V(DEBUG, TAG, "[EDR][Native] check whether it is connected or not");
+            OIC_LOG(DEBUG, TAG, "[EDR][Native] check whether it is connected or not");
 
             return state->state;
         }
@@ -1161,7 +1161,7 @@ void CAEDRNativeCreateDeviceSocketList()
     // create new object array
     if (g_deviceObjectList == NULL)
     {
-        OIC_LOG_V(DEBUG, TAG, "Create Device object list");
+        OIC_LOG(DEBUG, TAG, "Create Device object list");
 
         g_deviceObjectList = u_arraylist_create();
     }
@@ -1198,7 +1198,7 @@ void CAEDRNativeAddDeviceSocketToList(JNIEnv *env, jobject deviceSocket)
     {
         jobject gDeviceSocker = (*env)->NewGlobalRef(env, deviceSocket);
         u_arraylist_add(g_deviceObjectList, gDeviceSocker);
-        OIC_LOG_V(DEBUG, TAG, "Set Socket Object to Array");
+        OIC_LOG(DEBUG, TAG, "Set Socket Object to Array");
     }
 
     u_mutex_unlock(g_mutexSocketListManager);
@@ -1240,7 +1240,7 @@ jboolean CAEDRNativeIsDeviceSocketInList(JNIEnv *env, const char* remoteAddress)
 
         if(!strcmp(remoteAddress, setAddress))
         {
-            OIC_LOG_V(DEBUG, TAG, "the device is already set");
+            OIC_LOG(DEBUG, TAG, "the device is already set");
             return JNI_TRUE;
         }
         else
@@ -1249,13 +1249,13 @@ jboolean CAEDRNativeIsDeviceSocketInList(JNIEnv *env, const char* remoteAddress)
         }
     }
 
-    OIC_LOG_V(DEBUG, TAG, "there are no the Device obejct in list. we can add");
+    OIC_LOG(DEBUG, TAG, "there are no the Device obejct in list. we can add");
     return JNI_FALSE;
 }
 
 void CAEDRNativeRemoveAllDeviceSocket(JNIEnv *env)
 {
-    OIC_LOG_V(DEBUG, TAG, "CANativeRemoveAllDeviceObjsList");
+    OIC_LOG(DEBUG, TAG, "CANativeRemoveAllDeviceObjsList");
 
     if(!g_deviceObjectList)
     {
@@ -1282,7 +1282,7 @@ void CAEDRNativeRemoveAllDeviceSocket(JNIEnv *env)
 
 void CAEDRNativeRemoveDeviceSocket(JNIEnv *env, jobject deviceSocket)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAEDRNativeRemoveDeviceSocket");
+    OIC_LOG(DEBUG, TAG, "CAEDRNativeRemoveDeviceSocket");
 
     if(!g_deviceObjectList)
     {
@@ -1335,7 +1335,7 @@ void CAEDRNativeRemoveDeviceSocket(JNIEnv *env, jobject deviceSocket)
 
 jobject CAEDRNativeGetDeviceSocket(uint32_t idx)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAEDRNativeGetDeviceSocket");
+    OIC_LOG(DEBUG, TAG, "CAEDRNativeGetDeviceSocket");
 
     if(idx < 0)
     {
index 3dd9463..be2bf06 100644 (file)
 
 CAResult_t CAEDRInitializeNetworkMonitor()
 {
-    OIC_LOG_V(DEBUG, TAG, "IN");
+    OIC_LOG(DEBUG, TAG, "IN");
 
-    OIC_LOG_V(DEBUG, TAG, "OUT");
+    OIC_LOG(DEBUG, TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 void CAEDRSetNetworkChangeCallback(
     CAEDRNetworkStatusCallback networkChangeCallback)
 {
-    OIC_LOG_V(DEBUG, TAG, "IN");
+    OIC_LOG(DEBUG, TAG, "IN");
 
-    OIC_LOG_V(DEBUG, TAG, "OUT");
+    OIC_LOG(DEBUG, TAG, "OUT");
 }
 
 void CAEDRTerminateNetworkMonitor(void)
 {
-    OIC_LOG_V(DEBUG, TAG, "IN");
+    OIC_LOG(DEBUG, TAG, "IN");
 
-    OIC_LOG_V(DEBUG, TAG, "OUT");
+    OIC_LOG(DEBUG, TAG, "OUT");
 }
 
 CAResult_t CAEDRStartNetworkMonitor()
 {
-    OIC_LOG_V(DEBUG, TAG, "IN");
+    OIC_LOG(DEBUG, TAG, "IN");
 
-    OIC_LOG_V(DEBUG, TAG, "OUT");
+    OIC_LOG(DEBUG, TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAEDRStopNetworkMonitor()
 {
-    OIC_LOG_V(DEBUG, TAG, "IN");
+    OIC_LOG(DEBUG, TAG, "IN");
 
-    OIC_LOG_V(DEBUG, TAG, "OUT");
+    OIC_LOG(DEBUG, TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAEDRClientSetCallbacks(void)
 {
-    OIC_LOG_V(DEBUG, TAG, "IN");
+    OIC_LOG(DEBUG, TAG, "IN");
 
-    OIC_LOG_V(DEBUG, TAG, "OUT");
+    OIC_LOG(DEBUG, TAG, "OUT");
     return CA_STATUS_OK;
 }
 
index 645a2f2..c0e4892 100644 (file)
@@ -120,7 +120,7 @@ static CAEDRDataReceivedCallback g_EDRPacketReceivedCallback = NULL;
 
 static void CAReceiveHandler(void *data)
 {
-    OIC_LOG_V(DEBUG, TAG, "start CAReceiveHandler..");
+    OIC_LOG(DEBUG, TAG, "start CAReceiveHandler..");
     OIC_LOG(DEBUG, TAG, "IN");
     // Input validation
     VERIFY_NON_NULL_VOID(data, TAG, "Invalid thread context");
@@ -130,12 +130,12 @@ static void CAReceiveHandler(void *data)
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**)&env, JNI_VERSION_1_6);
     if(res != JNI_OK)
     {
-        OIC_LOG_V(DEBUG, TAG, "CAReceiveHandler - Could not get JNIEnv pointer");
+        OIC_LOG(DEBUG, TAG, "CAReceiveHandler - Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if(res != JNI_OK)
         {
-            OIC_LOG_V(DEBUG, TAG, "AttachCurrentThread failed");
+            OIC_LOG(DEBUG, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = JNI_TRUE;
@@ -152,12 +152,12 @@ static void CAReceiveHandler(void *data)
         uint32_t length = CAEDRServerGetSocketListLength();
         if (0 == length)
         {
-            OIC_LOG_V(DEBUG, TAG, "socket list is empty");
+            OIC_LOG(DEBUG, TAG, "socket list is empty");
         }
 
         for (idx = 0; idx < length; idx++)
         {
-            OIC_LOG_V(DEBUG, TAG, "start CAEDRNativeReadData");
+            OIC_LOG(DEBUG, TAG, "start CAEDRNativeReadData");
             CAEDRNativeReadData(env, idx, ctx->type);
         }
 
@@ -186,12 +186,12 @@ static void CAAcceptHandler(void *data)
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**)&env, JNI_VERSION_1_6);
     if(res != JNI_OK)
     {
-        OIC_LOG_V(DEBUG, TAG, "CAAcceptHandler - Could not get JNIEnv pointer");
+        OIC_LOG(DEBUG, TAG, "CAAcceptHandler - Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if(res != JNI_OK)
         {
-            OIC_LOG_V(DEBUG, TAG, "AttachCurrentThread failed");
+            OIC_LOG(DEBUG, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = JNI_TRUE;
@@ -232,17 +232,17 @@ static void CAAcceptHandler(void *data)
 
 CAResult_t CAEDRServerStart(const char *serviceUUID, int32_t *serverFD, u_thread_pool_t handle)
 {
-    OIC_LOG_V(DEBUG, TAG, "IN");
+    OIC_LOG(DEBUG, TAG, "IN");
     CAEDRServerInitialize(handle);
     // FIXME
     CAEDRStartUnicastServer(NULL, false);
-    OIC_LOG_V(DEBUG, TAG, "OUT");
+    OIC_LOG(DEBUG, TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAEDRServerStop(int serverFD)
 {
-    OIC_LOG_V(DEBUG, TAG, "IN");
+    OIC_LOG(DEBUG, TAG, "IN");
     CAEDRStopUnicastServer(-1);
     CAEDRStopMulticastServer(-1);
 
@@ -250,7 +250,7 @@ CAResult_t CAEDRServerStop(int serverFD)
     g_stopMulticast = TRUE;
     g_stopUnicast = TRUE;
 
-    OIC_LOG_V(DEBUG, TAG, "OUT");
+    OIC_LOG(DEBUG, TAG, "OUT");
     return CA_STATUS_OK;
 }
 
@@ -326,7 +326,7 @@ static CAResult_t CAEDRServerCreateMutex()
 
 void CAEDRServerJniInit(JNIEnv *env, JavaVM* jvm)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAEDRServerJniInit");
+    OIC_LOG(DEBUG, TAG, "CAEDRServerJniInit");
     g_jvm = jvm;
 }
 
@@ -344,12 +344,12 @@ void CAEDRServerInitialize(u_thread_pool_t handle)
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**)&env, JNI_VERSION_1_6);
     if(res != JNI_OK)
     {
-        OIC_LOG_V(DEBUG, TAG, "CAEDRServerInitialize - Could not get JNIEnv pointer");
+        OIC_LOG(DEBUG, TAG, "CAEDRServerInitialize - Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if(res != JNI_OK)
         {
-            OIC_LOG_V(DEBUG, TAG, "AttachCurrentThread failed");
+            OIC_LOG(DEBUG, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = JNI_TRUE;
@@ -401,12 +401,12 @@ void CAEDRServerTerminate()
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**)&env, JNI_VERSION_1_6);
     if(res != JNI_OK)
     {
-        OIC_LOG_V(DEBUG, TAG, "CAEDRServerTerminate - Could not get JNIEnv pointer");
+        OIC_LOG(DEBUG, TAG, "CAEDRServerTerminate - Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if(res != JNI_OK)
         {
-            OIC_LOG_V(DEBUG, TAG, "AttachCurrentThread failed");
+            OIC_LOG(DEBUG, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = JNI_TRUE;
@@ -463,7 +463,7 @@ int32_t CAEDRStartUnicastServer(const char* address, bool isSecured)
 
 int32_t CAEDRStartMulticastServer(bool isSecured)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAEDRStartMulticastServer");
+    OIC_LOG(DEBUG, TAG, "CAEDRStartMulticastServer");
 
     u_mutex_lock(g_mutexMulticastServer);
 
@@ -523,7 +523,7 @@ int32_t CAEDRStopMulticastServer(int32_t serverID)
     g_stopMulticast = true;
     u_mutex_unlock(g_mutexMulticastServer);
 
-    OIC_LOG_V(INFO, TAG, "Multicast server stopped");
+    OIC_LOG(INFO, TAG, "Multicast server stopped");
 
     return 0;
 }
@@ -585,7 +585,7 @@ CAResult_t CAEDRNativeReadData(JNIEnv *env, uint32_t id, CAAdapterServerType_t t
                 (*env)->ExceptionClear(env);
                 return CA_STATUS_FAILED;
             }
-            OIC_LOG_V(DEBUG, TAG, "[EDR][Native] btReadData: reading");
+            OIC_LOG(DEBUG, TAG, "[EDR][Native] btReadData: reading");
             jbyte* buf = (*env)->GetByteArrayElements(env, jbuf, NULL);
             jint length = strlen((char*)buf);
             OIC_LOG_V(DEBUG, TAG, "[EDR][Native] btReadData: read %s", buf);
@@ -610,7 +610,7 @@ CAResult_t CAEDRNativeReadData(JNIEnv *env, uint32_t id, CAAdapterServerType_t t
 
                 default:
                     // Should never occur
-                    OIC_LOG_V(DEBUG, TAG, "Invalid server type");
+                    OIC_LOG(DEBUG, TAG, "Invalid server type");
                     return CA_STATUS_FAILED;
             }
             (*env)->ReleaseByteArrayElements(env, jbuf, buf, 0);
@@ -819,12 +819,12 @@ void CAEDRServerNativeCreateDeviceStateList()
     // create new object array
     if (g_deviceStateList == NULL)
     {
-        OIC_LOG_V(DEBUG, TAG, "Create device list");
+        OIC_LOG(DEBUG, TAG, "Create device list");
 
         g_deviceStateList = u_arraylist_create();
         if (g_deviceStateList == NULL)
         {
-            OIC_LOG_V(DEBUG, TAG, "Create device list is null");
+            OIC_LOG(DEBUG, TAG, "Create device list is null");
         }
     }
 }
@@ -859,7 +859,7 @@ void CAEDRServerNativeAddDeviceStateToList(state_t *state)
     if(!CAEDRServerNativeIsDeviceInList(state->address)) {
         CAEDRServerNativeRemoveDevice(state->address); // delete previous state for update new state
         u_arraylist_add(g_deviceStateList, state);          // update new state
-        OIC_LOG_V(DEBUG, TAG, "Set State to Connected State List");
+        OIC_LOG(DEBUG, TAG, "Set State to Connected State List");
     }
 }
 
@@ -881,7 +881,7 @@ jboolean CAEDRServerNativeIsDeviceInList(const char* remoteAddress){
 
         if(!strcmp(remoteAddress, state->address))
         {
-            OIC_LOG_V(DEBUG, TAG, "the device is already set");
+            OIC_LOG(DEBUG, TAG, "the device is already set");
             return JNI_TRUE;
         }
         else
@@ -890,13 +890,13 @@ jboolean CAEDRServerNativeIsDeviceInList(const char* remoteAddress){
         }
     }
 
-    OIC_LOG_V(DEBUG, TAG, "there are no the device in list.");
+    OIC_LOG(DEBUG, TAG, "there are no the device in list.");
     return JNI_FALSE;
 }
 
 void CAEDRServerNativeRemoveAllDeviceState()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAEDRNativeRemoveAllDevices");
+    OIC_LOG(DEBUG, TAG, "CAEDRNativeRemoveAllDevices");
 
     if(!g_deviceStateList)
     {
@@ -923,7 +923,7 @@ void CAEDRServerNativeRemoveAllDeviceState()
 
 void CAEDRServerNativeRemoveDevice(const char *remoteAddress)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAEDRNativeRemoveDevice");
+    OIC_LOG(DEBUG, TAG, "CAEDRNativeRemoveDevice");
 
     if(!g_deviceStateList)
     {
@@ -960,7 +960,7 @@ void CAEDRServerNativeRemoveDevice(const char *remoteAddress)
 
 jboolean CAEDRServerIsConnectedDevice(const char *remoteAddress)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAEDRServerIsConnectedDevice");
+    OIC_LOG(DEBUG, TAG, "CAEDRServerIsConnectedDevice");
 
     if(!g_deviceStateList)
     {
@@ -984,7 +984,7 @@ jboolean CAEDRServerIsConnectedDevice(const char *remoteAddress)
 
         if(!strcmp(state->address, remoteAddress))
         {
-            OIC_LOG_V(DEBUG, TAG, "[EDR][Native] check whether it is connected or not");
+            OIC_LOG(DEBUG, TAG, "[EDR][Native] check whether it is connected or not");
 
             return state->state;
         }
@@ -1020,12 +1020,12 @@ void CAEDRServerNativeCreateDeviceSocketList()
     // create new object array
     if (g_deviceObjectList == NULL)
     {
-        OIC_LOG_V(DEBUG, TAG, "Create Device object list");
+        OIC_LOG(DEBUG, TAG, "Create Device object list");
 
         g_deviceObjectList = u_arraylist_create();
         if (g_deviceObjectList == NULL)
         {
-            OIC_LOG_V(DEBUG, TAG, "Create Device object list is null");
+            OIC_LOG(DEBUG, TAG, "Create Device object list is null");
         }
     }
 }
@@ -1061,7 +1061,7 @@ void CAEDRServerNativeAddDeviceSocketToList(JNIEnv *env, jobject deviceSocket)
     {
         jobject gDeviceSocket = (*env)->NewGlobalRef(env, deviceSocket);
         u_arraylist_add(g_deviceObjectList, gDeviceSocket);
-        OIC_LOG_V(DEBUG, TAG, "Set Object to Array as Element");
+        OIC_LOG(DEBUG, TAG, "Set Object to Array as Element");
     }
 
     (*env)->ReleaseStringUTFChars(env, jni_remoteAddress, remoteAddress);
@@ -1097,7 +1097,7 @@ jboolean CAEDRServerNativeIsDeviceSocketInList(JNIEnv *env, const char* remoteAd
         }
         if(!strcmp(remoteAddress, setAddress))
         {
-            OIC_LOG_V(DEBUG, TAG, "the device is already set");
+            OIC_LOG(DEBUG, TAG, "the device is already set");
             return JNI_TRUE;
         }
         else
@@ -1106,13 +1106,13 @@ jboolean CAEDRServerNativeIsDeviceSocketInList(JNIEnv *env, const char* remoteAd
         }
     }
 
-    OIC_LOG_V(DEBUG, TAG, "there are no the Device obejct in list. we can add");
+    OIC_LOG(DEBUG, TAG, "there are no the Device obejct in list. we can add");
     return JNI_FALSE;
 }
 
 void CAEDRServerNativeRemoveAllDeviceSocket(JNIEnv *env)
 {
-    OIC_LOG_V(DEBUG, TAG, "CANativeRemoveAllDeviceObjsList");
+    OIC_LOG(DEBUG, TAG, "CANativeRemoveAllDeviceObjsList");
 
     if(!g_deviceObjectList)
     {
@@ -1139,7 +1139,7 @@ void CAEDRServerNativeRemoveAllDeviceSocket(JNIEnv *env)
 
 void CAEDRServerNativeRemoveDeviceSocket(JNIEnv *env, jobject deviceSocket)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAEDRServerNativeRemoveDeviceSocket");
+    OIC_LOG(DEBUG, TAG, "CAEDRServerNativeRemoveDeviceSocket");
 
     if(!g_deviceObjectList)
     {
@@ -1198,7 +1198,7 @@ void CAEDRServerNativeRemoveDeviceSocket(JNIEnv *env, jobject deviceSocket)
 
 jobject CAEDRServerNativeGetDeviceSocket(uint32_t idx)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAEDRServerNativeGetDeviceSocket");
+    OIC_LOG(DEBUG, TAG, "CAEDRServerNativeGetDeviceSocket");
 
     if(idx < 0)
     {
index a533f52..c7e14cb 100644 (file)
@@ -49,7 +49,7 @@ jstring CAEDRNativeGetAddressFromDeviceSocket(JNIEnv *env, jobject bluetoothSock
     jclass jni_cid_BTSocket = (*env)->FindClass(env, "android/bluetooth/BluetoothSocket");
     if(!jni_cid_BTSocket)
     {
-        OIC_LOG_V(ERROR, TAG, "[EDR] getRemoteAddress: jni_cid_BTSocket is null");
+        OIC_LOG(ERROR, TAG, "[EDR] getRemoteAddress: jni_cid_BTSocket is null");
         return NULL;
     }
 
@@ -58,7 +58,7 @@ jstring CAEDRNativeGetAddressFromDeviceSocket(JNIEnv *env, jobject bluetoothSock
             "()Landroid/bluetooth/BluetoothDevice;");
     if(!jni_mid_getRemoteDevice)
     {
-        OIC_LOG_V(ERROR, TAG, "[EDR] getRemoteAddress: jni_mid_getRemoteDevice is null");
+        OIC_LOG(ERROR, TAG, "[EDR] getRemoteAddress: jni_mid_getRemoteDevice is null");
         return NULL;
     }
 
@@ -66,28 +66,28 @@ jstring CAEDRNativeGetAddressFromDeviceSocket(JNIEnv *env, jobject bluetoothSock
             bluetoothSocketObj, jni_mid_getRemoteDevice);
     if(!jni_obj_remoteBTDevice)
     {
-        OIC_LOG_V(ERROR, TAG, "[EDR] getRemoteAddress: jni_obj_remoteBTDevice is null");
+        OIC_LOG(ERROR, TAG, "[EDR] getRemoteAddress: jni_obj_remoteBTDevice is null");
         return NULL;
     }
 
     jclass jni_cid_BTDevice = (*env)->FindClass(env, "android/bluetooth/BluetoothDevice");
     if(!jni_cid_BTDevice)
     {
-        OIC_LOG_V(ERROR, TAG, "[EDR] getRemoteAddress: jni_cid_BTDevice is null");
+        OIC_LOG(ERROR, TAG, "[EDR] getRemoteAddress: jni_cid_BTDevice is null");
         return NULL;
     }
     jmethodID j_mid_getAddress = (*env)->GetMethodID(env, jni_cid_BTDevice,
             "getAddress", "()Ljava/lang/String;");
     if(!j_mid_getAddress)
     {
-        OIC_LOG_V(ERROR, TAG, "[EDR] getRemoteAddress: j_mid_getAddress is null");
+        OIC_LOG(ERROR, TAG, "[EDR] getRemoteAddress: j_mid_getAddress is null");
         return NULL;
     }
 
     jstring j_str_address = (*env)->CallObjectMethod(env, jni_obj_remoteBTDevice, j_mid_getAddress);
     if(!j_str_address)
     {
-        OIC_LOG_V(ERROR, TAG, "[EDR] getRemoteAddress: j_str_address is null");
+        OIC_LOG(ERROR, TAG, "[EDR] getRemoteAddress: j_str_address is null");
         return NULL;
     }
 
index 0ed00ff..5a24fae 100644 (file)
@@ -144,7 +144,7 @@ CAResult_t CAInitializeEDR(CARegisterConnectivityCallback registerCallback,
                            CANetworkChangeCallback networkStateChangeCallback,
                            u_thread_pool_t handle)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     // Input validation
     VERIFY_NON_NULL(registerCallback, EDR_ADAPTER_TAG, "register callback is NULL");
@@ -192,13 +192,13 @@ CAResult_t CAInitializeEDR(CARegisterConnectivityCallback registerCallback,
         return CA_STATUS_FAILED;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAStartEDR(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     //Start Monitoring EDR Network
     CAResult_t ret = CAEDRStartNetworkMonitor();
@@ -211,13 +211,13 @@ CAResult_t CAStartEDR(void)
     bool adapterState = false;
     if (CA_STATUS_OK != CAEDRGetAdapterEnableState(&adapterState))
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to get adapter enable state");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to get adapter enable state");
         return CA_STATUS_FAILED;
     }
 
     if (false == adapterState)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Bluetooth adapter is disabled!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Bluetooth adapter is disabled!");
         g_adapterState = false;
         return CA_STATUS_OK;
     }
@@ -234,20 +234,20 @@ CAResult_t CAStartEDR(void)
                   ret);
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return ret;
 }
 
 CAResult_t CAStartEDRListeningServer(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     return CAStartServer();
 }
 
 CAResult_t CAStartEDRDiscoveryServer(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     return CAStartServer();
 }
@@ -255,7 +255,7 @@ CAResult_t CAStartEDRDiscoveryServer(void)
 int32_t CASendEDRUnicastData(const CARemoteEndpoint_t *remoteEndpoint, const void *data,
                               uint32_t dataLength)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     CAResult_t err = CA_STATUS_OK;
 
@@ -265,13 +265,13 @@ int32_t CASendEDRUnicastData(const CARemoteEndpoint_t *remoteEndpoint, const voi
 
     if (0 == strlen(remoteEndpoint->addressInfo.BT.btMacAddress))
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Invalid input: EDR Address is empty!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Invalid input: EDR Address is empty!");
         return -1;
     }
 
     if (0 == dataLength)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Invalid input: data length is zero!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Invalid input: data length is zero!");
         return -1;
     }
 
@@ -285,13 +285,13 @@ int32_t CASendEDRUnicastData(const CARemoteEndpoint_t *remoteEndpoint, const voi
         return -1;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return sentLength;
 }
 
 int32_t CASendEDRMulticastData(const void *data, uint32_t dataLength)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN - CASendEDRMulticastData");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN - CASendEDRMulticastData");
 
     CAResult_t err = CA_STATUS_OK;
 
@@ -300,7 +300,7 @@ int32_t CASendEDRMulticastData(const void *data, uint32_t dataLength)
 
     if (0 == dataLength)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Invalid input: data length is zero!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Invalid input: data length is zero!");
         return -1;
     }
 
@@ -314,14 +314,14 @@ int32_t CASendEDRMulticastData(const void *data, uint32_t dataLength)
         return -1;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT - CASendEDRMulticastData");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT - CASendEDRMulticastData");
     return sentLen;
 }
 
 
 CAResult_t CAGetEDRInterfaceInformation(CALocalConnectivity_t **info, uint32_t *size)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     VERIFY_NON_NULL(info, EDR_ADAPTER_TAG, "LocalConnectivity info is null");
 
@@ -335,20 +335,20 @@ CAResult_t CAGetEDRInterfaceInformation(CALocalConnectivity_t **info, uint32_t *
     }
 
     *size = 1;
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return err;
 }
 
 CAResult_t CAReadEDRData(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     return CAEDRManagerReadData();
 }
 
 CAResult_t CAStopEDR(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     // Stop RFComm server if it is running
     if (-1 != g_serverId)
@@ -369,13 +369,13 @@ CAResult_t CAStopEDR(void)
     // Stop Send and receive Queue
     CAAdapterStopQueue();
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 void CATerminateEDR(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     // Terminate EDR Network Monitor
     CAEDRTerminateNetworkMonitor();
@@ -399,18 +399,18 @@ void CATerminateEDR(void)
     CAAdapterFreeLocalEndpoint(g_localConnectivity);
     g_localConnectivity = NULL;
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
 
 CAResult_t CAStartServer(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     CAResult_t err = CA_STATUS_OK;
 
     if (false == g_adapterState)
     {
-        OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "Bluetooth adapter is disabled!");
+        OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "Bluetooth adapter is disabled!");
         // Setting g_serverState for starting Rfcommserver when adapter starts
         g_serverState = TRUE;
         return CA_STATUS_OK;
@@ -418,7 +418,7 @@ CAResult_t CAStartServer(void)
 
     if (-1 < g_serverId)
     {
-        OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "Server is already in running state.");
+        OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "Server is already in running state.");
         return CA_STATUS_OK;
     }
 
@@ -429,13 +429,13 @@ CAResult_t CAStartServer(void)
         return err;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return err;
 }
 
 CAResult_t CAEDRInitializeQueueHandlers(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     if (CA_STATUS_OK == CAEDRInitializeSendHandler()
         && CA_STATUS_OK == CAEDRInitializeReceiveHandler())
@@ -444,13 +444,13 @@ CAResult_t CAEDRInitializeQueueHandlers(void)
         return CA_STATUS_OK;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_FAILED;
 }
 
 CAResult_t CAEDRInitializeSendHandler(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
     // Check if the message queue is already initialized
     if (g_sendQueueHandle)
     {
@@ -476,7 +476,7 @@ CAResult_t CAEDRInitializeSendHandler(void)
 
 CAResult_t CAEDRInitializeReceiveHandler(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
     // Check if the message queue is already initialized
     if (g_recvQueueHandle)
     {
@@ -498,13 +498,13 @@ CAResult_t CAEDRInitializeReceiveHandler(void)
         return CA_STATUS_FAILED;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 void CAAdapterTerminateQueues(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     if (g_sendQueueHandle)
     {
@@ -517,17 +517,17 @@ void CAAdapterTerminateQueues(void)
         g_recvQueueHandle = NULL;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
 
 void CAAdapterDataSendHandler(void *context)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN - CAAdapterDataSendHandler");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN - CAAdapterDataSendHandler");
 
     CAEDRData *message = (CAEDRData *) context;
     if (message == NULL)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to get message!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to get message!");
         return;
     }
 
@@ -537,7 +537,7 @@ void CAAdapterDataSendHandler(void *context)
 
     if(NULL == message->remoteEndpoint)
     {
-        OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "remoteEndpoint is not available");
+        OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "remoteEndpoint is not available");
     }
 
     remoteAddress = message->remoteEndpoint->addressInfo.BT.btMacAddress;
@@ -588,7 +588,7 @@ void CAAdapterDataSendHandler(void *context)
     if (CA_STATUS_OK != CAEDRClientSendData(remoteAddress, serviceUUID,
                                                 dataSegment, length, &sentLength))
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "CAEDRClientSendData API failed");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "CAEDRClientSendData API failed");
         OICFree(dataSegment);
         return;
     }
@@ -603,7 +603,7 @@ void CAAdapterDataSendHandler(void *context)
                     message->data + ((index * CA_SUPPORTED_BLE_MTU_SIZE) - CA_HEADER_LENGTH),
                     CA_SUPPORTED_BLE_MTU_SIZE, &sentLength))
         {
-            OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "CAEDRClientSendData API failed");
+            OIC_LOG(ERROR, EDR_ADAPTER_TAG, "CAEDRClientSendData API failed");
             return;
         }
     }
@@ -616,12 +616,12 @@ void CAAdapterDataSendHandler(void *context)
                     message->data + (index * CA_SUPPORTED_BLE_MTU_SIZE) - CA_HEADER_LENGTH,
                     message->dataLen % CA_SUPPORTED_BLE_MTU_SIZE + CA_HEADER_LENGTH, &sentLength))
         {
-            OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "CAEDRClientSendData API failed");
+            OIC_LOG(ERROR, EDR_ADAPTER_TAG, "CAEDRClientSendData API failed");
             return;
         }
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
 
 CAResult_t CAEDRClientSendData(const char *remoteAddress, const char *serviceUUID,
@@ -634,7 +634,7 @@ CAResult_t CAEDRClientSendData(const char *remoteAddress, const char *serviceUUI
         if (CA_STATUS_OK != CAEDRClientSendUnicastData(remoteAddress, serviceUUID,
                 data, dataLength, sentLength))
         {
-            OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to send unicast data !");
+            OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to send unicast data !");
             return CA_STATUS_FAILED;
         }
     }
@@ -644,7 +644,7 @@ CAResult_t CAEDRClientSendData(const char *remoteAddress, const char *serviceUUI
         if (CA_STATUS_OK != CAEDRClientSendMulticastData(serviceUUID, data,
                 dataLength, sentLength))
         {
-            OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to send multicast data !");
+            OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to send multicast data !");
             return CA_STATUS_FAILED;
         }
     }
@@ -653,12 +653,12 @@ CAResult_t CAEDRClientSendData(const char *remoteAddress, const char *serviceUUI
 
 void CAAdapterDataReceiverHandler(void *context)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN_CAAdapterDataReceiverHandler");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN_CAAdapterDataReceiverHandler");
 
     CAEDRData *message = (CAEDRData *) context;
     if (message == NULL)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to get message!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to get message!");
         return;
     }
 
@@ -672,7 +672,7 @@ void CAAdapterDataReceiverHandler(void *context)
         totalDataLen = CAParseHeader((char*)message->data);
         if (totalDataLen == 0)
         {
-            OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "totalDataLen is zero");
+            OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "totalDataLen is zero");
             return;
         }
 
@@ -682,7 +682,7 @@ void CAAdapterDataReceiverHandler(void *context)
         defragData = (char *) OICMalloc(sizeof(char) * totalDataLen);
         if (!defragData)
         {
-            OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "defragData is null");
+            OIC_LOG(ERROR, EDR_ADAPTER_TAG, "defragData is null");
             return;
         }
 
@@ -705,7 +705,7 @@ void CAAdapterDataReceiverHandler(void *context)
 
     if (totalDataLen == recvDataLen)
     {
-        OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "Sending data up !");
+        OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "Sending data up !");
         g_networkPacketReceivedCallback(remoteEndpoint, defragData, recvDataLen);
         recvDataLen = 0;
         totalDataLen = 0;
@@ -713,7 +713,7 @@ void CAAdapterDataReceiverHandler(void *context)
         g_isHeaderAvailable = false;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT_CAAdapterDataReceiverHandler");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT_CAAdapterDataReceiverHandler");
 }
 
 CAResult_t CAAdapterStartQueue()
@@ -757,11 +757,11 @@ CAResult_t CAAdapterStopQueue()
 void CAAdapterRecvData(const char *remoteAddress, const void *data,
                                     uint32_t dataLength, uint32_t *sentLength)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     if (false == g_adapterState)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Bluetooth adapter is disabled!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Bluetooth adapter is disabled!");
         *sentLength = 0;
         return;
     }
@@ -778,7 +778,7 @@ void CAAdapterRecvData(const char *remoteAddress, const void *data,
                                          serviceUUID);
     if (NULL == remoteEndpoint)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to create remote endpoint !");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to create remote endpoint !");
         return;
     }
 
@@ -790,18 +790,18 @@ void CAAdapterRecvData(const char *remoteAddress, const void *data,
     // Free remote endpoint
     CAAdapterFreeRemoteEndpoint(remoteEndpoint);
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return;
 }
 
 CAResult_t CAAdapterSendData(const char *remoteAddress, const char *serviceUUID,
                                const void *data, uint32_t dataLength, uint32_t *sentLength)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN - CAAdapterSendData");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN - CAAdapterSendData");
 
     if (false == g_adapterState)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Bluetooth adapter is disabled!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Bluetooth adapter is disabled!");
         *sentLength = 0;
         return CA_STATUS_OK;
     }
@@ -815,7 +815,7 @@ CAResult_t CAAdapterSendData(const char *remoteAddress, const char *serviceUUID,
                                          serviceUUID);
     if (NULL == remoteEndpoint)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to create remote endpoint !");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to create remote endpoint !");
         return CA_STATUS_FAILED;
     }
 
@@ -827,13 +827,13 @@ CAResult_t CAAdapterSendData(const char *remoteAddress, const char *serviceUUID,
     // Free remote endpoint
     CAAdapterFreeRemoteEndpoint(remoteEndpoint);
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT - CAAdapterSendData");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT - CAAdapterSendData");
     return CA_STATUS_OK;
 }
 
 void CAEDRNotifyNetworkStatus(CANetworkStatus_t status)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     // Create localconnectivity
     if (NULL == g_localConnectivity)
@@ -849,13 +849,13 @@ void CAEDRNotifyNetworkStatus(CANetworkStatus_t status)
             bool adapterState = false;
             if (CA_STATUS_OK != CAEDRGetAdapterEnableState(&adapterState))
             {
-                OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to get adapter enable state");
+                OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to get adapter enable state");
                 return;
             }
 
             if (false== adapterState)
             {
-                OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Bluetooth adapter is disabled!");
+                OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Bluetooth adapter is disabled!");
                 g_adapterState = false;
                 return;
             }
@@ -885,22 +885,22 @@ void CAEDRNotifyNetworkStatus(CANetworkStatus_t status)
             if (CA_STATUS_OK != u_thread_pool_add_task(g_edrThreadPool, CAEDROnNetworkStatusChanged,
                     event))
             {
-                OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to create threadpool!");
+                OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to create threadpool!");
                 return;
             }
         }
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
 
 void CAEDROnNetworkStatusChanged(void *context)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     if (NULL == context)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "context is NULL!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "context is NULL!");
         return;
     }
 
@@ -915,7 +915,7 @@ void CAEDROnNetworkStatusChanged(void *context)
     // Free the created Network event
     CAEDRFreeNetworkEvent(networkEvent);
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
 
 CAEDRNetworkEvent *CAEDRCreateNetworkEvent(CALocalConnectivity_t *connectivity,
@@ -927,7 +927,7 @@ CAEDRNetworkEvent *CAEDRCreateNetworkEvent(CALocalConnectivity_t *connectivity,
     CAEDRNetworkEvent *event = (CAEDRNetworkEvent *) OICMalloc(sizeof(CAEDRNetworkEvent));
     if (NULL == event)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to allocate memory to network event!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to allocate memory to network event!");
         return NULL;
     }
 
index 7be3f06..6290396 100644 (file)
@@ -34,7 +34,7 @@ CAResult_t CAInitializeEDR(CARegisterConnectivityCallback registerCallback,
         CANetworkPacketReceivedCallback reqRespCallback, CANetworkChangeCallback netCallback,
         u_thread_pool_t handle)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAInitializeEDR");
+    OIC_LOG(DEBUG, TAG, "CAInitializeEDR");
 
     g_edrReceivedCallback = reqRespCallback;
     g_threadPoolHandle = handle;
@@ -60,21 +60,21 @@ CAResult_t CAInitializeEDR(CARegisterConnectivityCallback registerCallback,
 
 CAResult_t CAStartEDR()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAStartEDR");
+    OIC_LOG(DEBUG, TAG, "CAStartEDR");
 
     return CA_STATUS_OK;
 }
 
 CAResult_t CAStartEDRListeningServer()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAStartEDRListeningServer");
+    OIC_LOG(DEBUG, TAG, "CAStartEDRListeningServer");
 
     return CA_STATUS_OK;
 }
 
 CAResult_t CAStartEDRDiscoveryServer()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAStartEDRDiscoveryServer");
+    OIC_LOG(DEBUG, TAG, "CAStartEDRDiscoveryServer");
 
     return CA_STATUS_OK;
 }
@@ -82,41 +82,41 @@ CAResult_t CAStartEDRDiscoveryServer()
 int32_t CASendEDRUnicastData(const CARemoteEndpoint_t *endpoint, const void *data,
     uint32_t dataLen)
 {
-    OIC_LOG_V(DEBUG, TAG, "CASendEDRUnicastData");
+    OIC_LOG(DEBUG, TAG, "CASendEDRUnicastData");
 
     return -1;
 }
 
 int32_t CASendEDRMulticastData(const void *data, uint32_t dataLen)
 {
-    OIC_LOG_V(DEBUG, TAG, "CASendEDRMulticastData");
+    OIC_LOG(DEBUG, TAG, "CASendEDRMulticastData");
 
     return -1;
 }
 
 CAResult_t CAGetEDRInterfaceInformation(CALocalConnectivity_t **info, uint32_t *size)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAGetEDRInterfaceInformation");
+    OIC_LOG(DEBUG, TAG, "CAGetEDRInterfaceInformation");
 
     return CA_STATUS_OK;
 }
 
 CAResult_t CAReadEDRData()
 {
-    OIC_LOG_V(DEBUG, TAG, "Read EDR Data");
+    OIC_LOG(DEBUG, TAG, "Read EDR Data");
 
     return CA_STATUS_OK;
 }
 
 CAResult_t CAStopEDR()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAStopEDR");
+    OIC_LOG(DEBUG, TAG, "CAStopEDR");
 
     return CA_STATUS_OK;
 }
 
 void CATerminateEDR()
 {
-    OIC_LOG_V(DEBUG, TAG, "CATerminateEDR");
+    OIC_LOG(DEBUG, TAG, "CATerminateEDR");
 }
 
index adc3e01..30c7589 100644 (file)
@@ -143,7 +143,7 @@ void CAEDRSetPacketReceivedCallback(CAEDRDataReceivedCallback packetReceivedCall
 void CAEDRSocketConnectionStateCallback(int result, bt_socket_connection_state_e state,
                                        bt_socket_connection_s *connection, void *userData)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     EDRDevice *device = NULL;
 
@@ -175,7 +175,7 @@ void CAEDRSocketConnectionStateCallback(int result, bt_socket_connection_state_e
 
                     if(!device)
                     {
-                        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "EDRDevice is null!");
+                        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "EDRDevice is null!");
                         u_mutex_unlock(g_edrDeviceListMutex);
                         return;
                     }
@@ -187,7 +187,7 @@ void CAEDRSocketConnectionStateCallback(int result, bt_socket_connection_state_e
 
                 if(!device)
                 {
-                    OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "EDRDevice is null!");
+                    OIC_LOG(ERROR, EDR_ADAPTER_TAG, "EDRDevice is null!");
                     u_mutex_unlock(g_edrDeviceListMutex);
                     return;
                 }
@@ -224,14 +224,14 @@ void CAEDRSocketConnectionStateCallback(int result, bt_socket_connection_state_e
             break;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
 
 
 void CAEDRDeviceDiscoveryCallback(int result, bt_adapter_device_discovery_state_e state,
                                  bt_adapter_device_discovery_info_s *discoveryInfo, void *userData)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     EDRDevice *device = NULL;
 
@@ -246,13 +246,13 @@ void CAEDRDeviceDiscoveryCallback(int result, bt_adapter_device_discovery_state_
     {
         case BT_ADAPTER_DEVICE_DISCOVERY_STARTED:
             {
-                OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "Discovery started!");
+                OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "Discovery started!");
             }
             break;
 
         case BT_ADAPTER_DEVICE_DISCOVERY_FINISHED:
             {
-                OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "Discovery finished!");
+                OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "Discovery finished!");
             }
             break;
 
@@ -271,7 +271,7 @@ void CAEDRDeviceDiscoveryCallback(int result, bt_adapter_device_discovery_state_
                     {
                         if(!device)
                         {
-                            OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "EDRDevice is null!");
+                            OIC_LOG(ERROR, EDR_ADAPTER_TAG, "EDRDevice is null!");
                             u_mutex_unlock(g_edrDeviceListMutex);
                             return;
                         }
@@ -285,14 +285,14 @@ void CAEDRDeviceDiscoveryCallback(int result, bt_adapter_device_discovery_state_
                             discoveryInfo->remote_address, OIC_EDR_SERVICE_ID, &device);
                     if (CA_STATUS_OK != res)
                     {
-                        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to add device to list!");
+                        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to add device to list!");
                         u_mutex_unlock(g_edrDeviceListMutex);
                         return;
                     }
 
                     if(!device)
                     {
-                        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "EDRDevice is null!");
+                        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "EDRDevice is null!");
                         u_mutex_unlock(g_edrDeviceListMutex);
                         return;
                     }
@@ -301,23 +301,23 @@ void CAEDRDeviceDiscoveryCallback(int result, bt_adapter_device_discovery_state_
                 }
                 else
                 {
-                    OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Device does not support OIC service!");
+                    OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Device does not support OIC service!");
                 }
             }
             break;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
 
 void CAEDRServiceSearchedCallback(int32_t result,
                 bt_device_sdp_info_s *sdpInfo,void *userData)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     if (NULL == sdpInfo)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "SDP info is null!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "SDP info is null!");
         return;
     }
 
@@ -329,7 +329,7 @@ void CAEDRServiceSearchedCallback(int32_t result,
     {
         if (device->serviceSearched)
         {
-            OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "Service is already searched for this device!");
+            OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "Service is already searched for this device!");
             u_mutex_unlock(g_edrDeviceListMutex);
             return;
         }
@@ -341,7 +341,7 @@ void CAEDRServiceSearchedCallback(int32_t result,
             res = CAEDRClientConnect(sdpInfo->remote_address, OIC_EDR_SERVICE_ID);
             if (CA_STATUS_OK != res)
             {
-                OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to make rfcomm connection!");
+                OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to make rfcomm connection!");
 
                 // Remove the device from device list
                 CARemoveEDRDeviceFromList(&g_edrDeviceList, sdpInfo->remote_address);
@@ -349,7 +349,7 @@ void CAEDRServiceSearchedCallback(int32_t result,
         }
         else
         {
-            OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "Device does not contain OIC service!");
+            OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "Device does not contain OIC service!");
 
             // Remove device from list as it does not support OIC service
             CARemoveEDRDeviceFromList(&g_edrDeviceList, sdpInfo->remote_address);
@@ -358,12 +358,12 @@ void CAEDRServiceSearchedCallback(int32_t result,
 
     u_mutex_unlock(g_edrDeviceListMutex);
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
 
 CAResult_t CAEDRStartDeviceDiscovery(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
 
     bool isDiscoveryStarted = false;
@@ -389,13 +389,13 @@ CAResult_t CAEDRStartDeviceDiscovery(void)
         }
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAEDRStopServiceSearch(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     bt_error_e err = bt_device_cancel_service_search();
     // Stop ongoing service search
@@ -406,13 +406,13 @@ CAResult_t CAEDRStopServiceSearch(void)
         return CA_STATUS_FAILED;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAEDRStopDeviceDiscovery(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     bool isDiscoveryStarted = false;
     bt_error_e err = bt_adapter_is_discovering(&isDiscoveryStarted);
@@ -427,7 +427,7 @@ CAResult_t CAEDRStopDeviceDiscovery(void)
     //stop the device discovery process
     if (true == isDiscoveryStarted)
     {
-        OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "Stopping the device search process");
+        OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "Stopping the device search process");
         if (BT_ERROR_NONE != (err = bt_adapter_stop_device_discovery()))
         {
             OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to stop discovery!, error num [%x]",
@@ -435,19 +435,19 @@ CAResult_t CAEDRStopDeviceDiscovery(void)
         }
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAEDRStartServiceSearch(const char *remoteAddress)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     // Input validation
     VERIFY_NON_NULL(remoteAddress, EDR_ADAPTER_TAG, "Remote address is null");
     if (!remoteAddress[0])
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Remote address is empty!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Remote address is empty!");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -460,13 +460,13 @@ CAResult_t CAEDRStartServiceSearch(const char *remoteAddress)
         return CA_STATUS_FAILED;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAEDRClientSetCallbacks(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     // Register for discovery and rfcomm socket connection callbacks
     bt_adapter_set_device_discovery_state_changed_cb(CAEDRDeviceDiscoveryCallback, NULL);
@@ -482,14 +482,14 @@ CAResult_t CAEDRClientSetCallbacks(void)
         return CA_STATUS_FAILED;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 
 void CAEDRClientUnsetCallbacks(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     // Stop service search
     CAEDRStopServiceSearch();
@@ -498,30 +498,30 @@ void CAEDRClientUnsetCallbacks(void)
     CAEDRStopDeviceDiscovery();
 
     // reset bluetooth adapter callbacks
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "Resetting the callbacks");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "Resetting the callbacks");
     bt_adapter_unset_device_discovery_state_changed_cb();
     bt_device_unset_service_searched_cb();
     bt_socket_unset_connection_state_changed_cb();
     bt_socket_unset_data_received_cb();
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
 
 void CAEDRManagerInitializeMutex(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     if (!g_edrDeviceListMutex)
     {
         g_edrDeviceListMutex = u_mutex_new();
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
 
 void CAEDRManagerTerminateMutex(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     if (g_edrDeviceListMutex)
     {
@@ -529,7 +529,7 @@ void CAEDRManagerTerminateMutex(void)
         g_edrDeviceListMutex = NULL;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
 
 void CAEDRInitializeClient(u_thread_pool_t handle)
@@ -558,7 +558,7 @@ void CAEDRClientTerminate()
 
 void CAEDRClientDisconnectAll(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     u_mutex_lock(g_edrDeviceListMutex);
 
@@ -583,14 +583,14 @@ void CAEDRClientDisconnectAll(void)
 
     u_mutex_unlock(g_edrDeviceListMutex);
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
 
 
 CAResult_t CAEDRClientSendUnicastData(const char *remoteAddress, const char *serviceUUID,
                                       const void *data, uint32_t dataLength, uint32_t *sentLength)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     EDRDevice *device = NULL;
 
@@ -602,7 +602,7 @@ CAResult_t CAEDRClientSendUnicastData(const char *remoteAddress, const char *ser
 
     if (0 >= dataLength)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Invalid input: Negative data length!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Invalid input: Negative data length!");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -616,7 +616,7 @@ CAResult_t CAEDRClientSendUnicastData(const char *remoteAddress, const char *ser
                                             OIC_EDR_SERVICE_ID, &device);
         if (CA_STATUS_OK != result)
         {
-            OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed create device and add to list!");
+            OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed create device and add to list!");
 
             u_mutex_unlock(g_edrDeviceListMutex);
             return CA_STATUS_FAILED;
@@ -626,7 +626,7 @@ CAResult_t CAEDRClientSendUnicastData(const char *remoteAddress, const char *ser
         result = CAEDRStartServiceSearch(remoteAddress);
         if (CA_STATUS_OK != result)
         {
-            OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to initiate service search!");
+            OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to initiate service search!");
 
             // Remove device from list
             CARemoveEDRDeviceFromList(&g_edrDeviceList, remoteAddress);
@@ -638,7 +638,7 @@ CAResult_t CAEDRClientSendUnicastData(const char *remoteAddress, const char *ser
 
     if(!device)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "EDRDevice is null!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "EDRDevice is null!");
         // Remove device from list
         CARemoveEDRDeviceFromList(&g_edrDeviceList, remoteAddress);
 
@@ -655,7 +655,7 @@ CAResult_t CAEDRClientSendUnicastData(const char *remoteAddress, const char *ser
                                               dataLength);
         if (CA_STATUS_OK != result)
         {
-            OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to add data to pending list!");
+            OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to add data to pending list!");
 
             //Remove device from list
             CARemoveEDRDeviceFromList(&g_edrDeviceList, remoteAddress);
@@ -666,7 +666,7 @@ CAResult_t CAEDRClientSendUnicastData(const char *remoteAddress, const char *ser
         if (device->serviceSearched &&
             CA_STATUS_OK != CAEDRClientConnect(remoteAddress, serviceUUID))
         {
-            OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to make RFCOMM connection!");
+            OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to make RFCOMM connection!");
 
             //Remove device from list
             CARemoveEDRDeviceFromList(&g_edrDeviceList, remoteAddress);
@@ -679,19 +679,19 @@ CAResult_t CAEDRClientSendUnicastData(const char *remoteAddress, const char *ser
         result = CAEDRSendData(device->socketFD, data, dataLength, sentLength);
         if (CA_STATUS_OK != result)
         {
-            OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to send data!");
+            OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to send data!");
             return CA_STATUS_FAILED;
         }
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAEDRClientSendMulticastData(const char *serviceUUID, const void *data,
                                         uint32_t dataLength, uint32_t *sentLength)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     // Input validation
     VERIFY_NON_NULL(serviceUUID, EDR_ADAPTER_TAG, "service UUID is null");
@@ -700,7 +700,7 @@ CAResult_t CAEDRClientSendMulticastData(const char *serviceUUID, const void *dat
 
     if (0 >= dataLength)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Invalid input: Negative data length!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Invalid input: Negative data length!");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -717,17 +717,17 @@ CAResult_t CAEDRClientSendMulticastData(const char *serviceUUID, const void *dat
 
         if (!device)
         {
-            OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "There is no device!");
+            OIC_LOG(ERROR, EDR_ADAPTER_TAG, "There is no device!");
             break;
         }
 
         if (-1 == device->socketFD)
         {
-            OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN1");
+            OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN1");
             // Check if the device service search is finished
             if (false == device->serviceSearched)
             {
-                OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Device services are still unknown!");
+                OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Device services are still unknown!");
                 continue;
             }
 
@@ -736,7 +736,7 @@ CAResult_t CAEDRClientSendMulticastData(const char *serviceUUID, const void *dat
                                                   dataLength);
             if (CA_STATUS_OK != result)
             {
-                OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to add data to pending list !");
+                OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to add data to pending list !");
                 continue;
             }
 
@@ -744,35 +744,35 @@ CAResult_t CAEDRClientSendMulticastData(const char *serviceUUID, const void *dat
             result = CAEDRClientConnect(device->remoteAddress, device->serviceUUID);
             if (CA_STATUS_OK != result)
             {
-                OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to make RFCOMM connection !");
+                OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to make RFCOMM connection !");
 
                 //Remove the data which added to pending list
                 CARemoveEDRDataFromList(&device->pendingDataList);
                 continue;
             }
-            OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN2");
+            OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN2");
         }
         else
         {
-            OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN3");
+            OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN3");
             result = CAEDRSendData(device->socketFD, data, dataLength, sentLength);
             if (CA_STATUS_OK != result)
             {
                 OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to send data to [%s] !",
                           device->remoteAddress);
             }
-            OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN4");
+            OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN4");
         }
     }
     u_mutex_unlock(g_edrDeviceListMutex);
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAEDRClientConnect(const char *remoteAddress, const char *serviceUUID)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     VERIFY_NON_NULL(remoteAddress, EDR_ADAPTER_TAG, "Remote address is null");
     VERIFY_NON_NULL(serviceUUID, EDR_ADAPTER_TAG, "Service UUID is null");
@@ -780,13 +780,13 @@ CAResult_t CAEDRClientConnect(const char *remoteAddress, const char *serviceUUID
     size_t addressLen = strlen(remoteAddress);
     if (0 == addressLen || CA_MACADDR_SIZE - 1 != addressLen)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Invalid input: Invalid remote address");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Invalid input: Invalid remote address");
         return  CA_STATUS_INVALID_PARAM;
     }
 
     if (!serviceUUID[0])
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Invalid input: Empty service uuid");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Invalid input: Empty service uuid");
         return  CA_STATUS_INVALID_PARAM;
     }
 
@@ -799,18 +799,18 @@ CAResult_t CAEDRClientConnect(const char *remoteAddress, const char *serviceUUID
         return CA_STATUS_FAILED;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAEDRClientDisconnect(const int32_t clientID)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     // Input validation
     if (0 > clientID)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Invalid input: negative client id");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Invalid input: negative client id");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -822,19 +822,19 @@ CAResult_t CAEDRClientDisconnect(const int32_t clientID)
         return CA_STATUS_FAILED;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 void CAEDRDataRecvCallback(bt_socket_received_data_s *data, void *userData)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     EDRDevice *device = NULL;
 
     if (NULL == data || 0 >= data->data_size)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Data is null!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Data is null!");
         return;
     }
 
@@ -843,7 +843,7 @@ void CAEDRDataRecvCallback(bt_socket_received_data_s *data, void *userData)
     CAResult_t result = CAGetEDRDeviceBySocketId(g_edrDeviceList, data->socket_fd, &device);
     if (CA_STATUS_OK != result)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Could not find the device!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Could not find the device!");
 
         u_mutex_unlock(g_edrDeviceListMutex);
         return;
@@ -852,7 +852,7 @@ void CAEDRDataRecvCallback(bt_socket_received_data_s *data, void *userData)
 
     if (!device)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "There is no device!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "There is no device!");
         return;
     }
 
@@ -861,7 +861,7 @@ void CAEDRDataRecvCallback(bt_socket_received_data_s *data, void *userData)
     g_edrPacketReceivedCallback(device->remoteAddress, data->data,
                                 (uint32_t)data->data_size, &sentLength);
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
 
 
index 7ad7ee5..cd84528 100644 (file)
@@ -96,7 +96,7 @@ CAResult_t CACreateEDRDevice(const char *deviceAddress, const char *uuid, EDRDev
     *device = (EDRDevice *) OICMalloc(sizeof(EDRDevice));
     if (NULL == *device)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Out of memory (device)!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Out of memory (device)!");
         return CA_MEMORY_ALLOC_FAILED;
     }
 
@@ -148,7 +148,7 @@ CAResult_t CAAddEDRDeviceToList(EDRDeviceList **deviceList, EDRDevice *device)
     EDRDeviceList *node = (EDRDeviceList *) OICMalloc(sizeof(EDRDeviceList));
     if (NULL == node)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Out of memory (device list)!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Out of memory (device list)!");
         return CA_MEMORY_ALLOC_FAILED;
     }
 
@@ -358,7 +358,7 @@ CAResult_t CAAddEDRDataToList(EDRDataList **dataList, const void *data, uint32_t
 
 CAResult_t CARemoveEDRDataFromList(EDRDataList **dataList)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     VERIFY_NON_NULL(dataList, EDR_ADAPTER_TAG, "Data list is null");
 
@@ -372,13 +372,13 @@ CAResult_t CARemoveEDRDataFromList(EDRDataList **dataList)
         OICFree(curNode);
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 void CADestroyEDRDataList(EDRDataList **dataList)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     VERIFY_NON_NULL_VOID(dataList, EDR_ADAPTER_TAG, "Data list is null");
 
@@ -393,7 +393,7 @@ void CADestroyEDRDataList(EDRDataList **dataList)
 
     *dataList = NULL;
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
 
 void CADestroyEDRData(EDRData *data)
index 3760f84..26e7402 100644 (file)
 CAResult_t CAEDRSendData(int serverFD, const void *data, uint32_t dataLength,
                          uint32_t *sentDataLen)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     VERIFY_NON_NULL(data, EDR_ADAPTER_TAG, "Data is null");
     VERIFY_NON_NULL(sentDataLen, EDR_ADAPTER_TAG, "Sent data length holder is null");
 
     if (0 > serverFD)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Invalid input: Negative socket id");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Invalid input: Negative socket id");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -52,7 +52,7 @@ CAResult_t CAEDRSendData(int serverFD, const void *data, uint32_t dataLength,
     }
 
     *sentDataLen = dataLen;
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
index 83caad3..d042e7d 100644 (file)
@@ -47,7 +47,7 @@ static void CAEDRAdapterStateChangeCallback(int result, bt_adapter_state_e adapt
 
 CAResult_t CAEDRInitializeNetworkMonitor()
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     // Initialize Bluetooth service
     int err = bt_initialize();
@@ -58,48 +58,48 @@ CAResult_t CAEDRInitializeNetworkMonitor()
         return CA_STATUS_FAILED;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 void CAEDRTerminateNetworkMonitor(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     g_edrNetworkChangeCallback = NULL;
 
     // Terminate Bluetooth service
     bt_deinitialize();
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
 
 CAResult_t CAEDRStartNetworkMonitor()
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     int ret = bt_adapter_set_state_changed_cb(CAEDRAdapterStateChangeCallback, NULL);
     if(BT_ERROR_NONE != ret)
     {
-       OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "bt_adapter_set_state_changed_cb failed");
+       OIC_LOG(ERROR, EDR_ADAPTER_TAG, "bt_adapter_set_state_changed_cb failed");
        return CA_STATUS_FAILED;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAEDRStopNetworkMonitor()
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
     // Unset bluetooth adapter callbacks
     int ret = bt_adapter_unset_state_changed_cb();
     if(BT_ERROR_NONE != ret)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "bt_adapter_set_state_changed_cb failed");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "bt_adapter_set_state_changed_cb failed");
         return CA_STATUS_FAILED;
     }
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
@@ -111,7 +111,7 @@ void CAEDRSetNetworkChangeCallback(
 
 CAResult_t CAEDRGetInterfaceInformation(CALocalConnectivity_t **info)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     // Input validation
     VERIFY_NON_NULL(info, EDR_ADAPTER_TAG, "LocalConnectivity info is null");
@@ -131,7 +131,7 @@ CAResult_t CAEDRGetInterfaceInformation(CALocalConnectivity_t **info)
     *info = CAAdapterCreateLocalEndpoint(CA_EDR, localAddress);
     if (NULL == *info)
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Failed to create LocalConnectivity instance!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Failed to create LocalConnectivity instance!");
 
         OICFree(localAddress);
         return CA_MEMORY_ALLOC_FAILED;
@@ -139,13 +139,13 @@ CAResult_t CAEDRGetInterfaceInformation(CALocalConnectivity_t **info)
 
     OICFree(localAddress);
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAEDRGetAdapterEnableState(bool *state)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     // Input validation
     VERIFY_NON_NULL(state, EDR_ADAPTER_TAG, "state holder is NULL!");
@@ -168,14 +168,14 @@ CAResult_t CAEDRGetAdapterEnableState(bool *state)
         *state = true;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 void CAEDRAdapterStateChangeCallback(int result, bt_adapter_state_e adapterState,
                                      void *userData)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     if (BT_ADAPTER_ENABLED == adapterState)
     {
@@ -194,5 +194,5 @@ void CAEDRAdapterStateChangeCallback(int result, bt_adapter_state_e adapterState
         }
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
 }
index e552695..eb47c13 100644 (file)
@@ -40,14 +40,14 @@ static int32_t g_maxPendingConnections = 10;
 
 CAResult_t CAEDRServerStart(const char *serviceUUID, int *serverFD, u_thread_pool_t handle)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     VERIFY_NON_NULL(serviceUUID, EDR_ADAPTER_TAG, "Service UUID is null");
     VERIFY_NON_NULL(serverFD, EDR_ADAPTER_TAG, "Server fd holder is null");
 
     if (!serviceUUID[0])
     {
-        OIC_LOG_V(ERROR, EDR_ADAPTER_TAG, "Invalid input: Empty service uuid!");
+        OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Invalid input: Empty service uuid!");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -62,7 +62,7 @@ CAResult_t CAEDRServerStart(const char *serviceUUID, int *serverFD, u_thread_poo
 
     if (isRunning)
     {
-        OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "Service is already running with this UUID!");
+        OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "Service is already running with this UUID!");
         return CA_SERVER_STARTED_ALREADY;
     }
 
@@ -90,13 +90,13 @@ CAResult_t CAEDRServerStart(const char *serviceUUID, int *serverFD, u_thread_poo
 
     *serverFD = socketFD;
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAEDRServerStop(int serverFD)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     bt_error_e err = bt_socket_destroy_rfcomm(serverFD);
     if (BT_ERROR_NONE != err)
@@ -106,7 +106,7 @@ CAResult_t CAEDRServerStop(int serverFD)
         return CA_STATUS_FAILED;
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
@@ -118,8 +118,8 @@ void CAEDRServerTerminate()
 
 CAResult_t CAEDRManagerReadData(void)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return CA_NOT_SUPPORTED;
 }
 
index 535fa02..70073ae 100644 (file)
 bool CAEDRIsServiceSupported(const char **serviceUUID, int32_t serviceCount,
                                  const char *matchService)
 {
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
 
     if (NULL == serviceUUID || 0 == serviceCount || NULL == matchService)
     {
-        OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "Invalid input");
+        OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "Invalid input");
         return false;
     }
 
@@ -45,12 +45,12 @@ bool CAEDRIsServiceSupported(const char **serviceUUID, int32_t serviceCount,
     {
         if (!strcasecmp(serviceUUID[i], matchService))
         {
-            OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "Service found !");
+            OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "Service found !");
             return true;
         }
     }
 
-    OIC_LOG_V(DEBUG, EDR_ADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
     return false;
 }
 
index aadd9f3..bde8cc4 100644 (file)
@@ -92,7 +92,7 @@ static void CALENetStateChangeCallback(const char* address, const uint32_t statu
         CALocalConnectivity_t *localEndpoint = CAAdapterCreateLocalEndpoint(CA_LE, address);
         if (!localEndpoint)
         {
-            OIC_LOG_V(ERROR, TAG, "Out of memory");
+            OIC_LOG(ERROR, TAG, "Out of memory");
             return;
         }
 
@@ -139,7 +139,7 @@ CAResult_t CAInitializeLE(CARegisterConnectivityCallback registerCallback,
 
 CAResult_t CAStartLE()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAStartLE");
+    OIC_LOG(DEBUG, TAG, "CAStartLE");
     //CANativeLEStartScan();
 
     return CA_STATUS_OK;
@@ -147,7 +147,7 @@ CAResult_t CAStartLE()
 
 CAResult_t CAStartLEListeningServer()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAStartLEListeningServer");
+    OIC_LOG(DEBUG, TAG, "CAStartLEListeningServer");
 
     g_isBluetoothGattServer = JNI_TRUE;
 
@@ -159,7 +159,7 @@ CAResult_t CAStartLEListeningServer()
 
 CAResult_t CAStartLEDiscoveryServer()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAStartLEDiscoveryServer");
+    OIC_LOG(DEBUG, TAG, "CAStartLEDiscoveryServer");
 
     g_isBluetoothGattServer = JNI_FALSE;
 
@@ -174,12 +174,12 @@ int32_t CASendLEUnicastData(const CARemoteEndpoint_t* endpoint, const void* data
 
     if (g_isBluetoothGattServer == JNI_FALSE)
     {
-        OIC_LOG_V(DEBUG, TAG, "CALESendUnicastData");
+        OIC_LOG(DEBUG, TAG, "CALESendUnicastData");
         CALESendUnicastMessage(endpoint->addressInfo.BT.btMacAddress, data, dataLen);
     }
     else
     {
-        OIC_LOG_V(DEBUG, TAG, "CALEServerSendUnicastData");
+        OIC_LOG(DEBUG, TAG, "CALEServerSendUnicastData");
         CALEServerSendUnicastMessage(endpoint->addressInfo.BT.btMacAddress, data, dataLen);
     }
 
@@ -190,12 +190,12 @@ int32_t CASendLEMulticastData(const void* data, uint32_t dataLen)
 {
     if (g_isBluetoothGattServer == JNI_FALSE)
     {
-        OIC_LOG_V(DEBUG, TAG, "CASendLEMulticastData");
+        OIC_LOG(DEBUG, TAG, "CASendLEMulticastData");
         CALESendMulticastMessage(data, dataLen);
     }
     else
     {
-        OIC_LOG_V(DEBUG, TAG, "CALEServerSendMulticastMessage");
+        OIC_LOG(DEBUG, TAG, "CALEServerSendMulticastMessage");
         CALEServerSendMulticastMessage(data, dataLen);
     }
 
@@ -204,7 +204,7 @@ int32_t CASendLEMulticastData(const void* data, uint32_t dataLen)
 
 CAResult_t CAStartLENotifyServer()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAStartLENotifyServer");
+    OIC_LOG(DEBUG, TAG, "CAStartLENotifyServer");
 
     return CA_STATUS_OK;
 }
@@ -214,12 +214,12 @@ uint32_t CASendLENotification(const CARemoteEndpoint_t* endpoint, const void* da
 {
     if (g_isBluetoothGattServer == JNI_FALSE)
     {
-        OIC_LOG_V(DEBUG, TAG, "not server mode");
+        OIC_LOG(DEBUG, TAG, "not server mode");
         return -1;
     }
     else
     {
-        OIC_LOG_V(DEBUG, TAG, "CALEServerSendLEUnicastData");
+        OIC_LOG(DEBUG, TAG, "CALEServerSendLEUnicastData");
         CALEServerSendUnicastMessage(endpoint->addressInfo.BT.btMacAddress, data, dataLen);
     }
 
@@ -228,7 +228,7 @@ uint32_t CASendLENotification(const CARemoteEndpoint_t* endpoint, const void* da
 
 CAResult_t CAGetLEInterfaceInformation(CALocalConnectivity_t** info, uint32_t* size)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAGetLEInterfaceInformation");
+    OIC_LOG(DEBUG, TAG, "CAGetLEInterfaceInformation");
 
     CALocalConnectivity_t *netInfo = NULL;
 
@@ -237,7 +237,7 @@ CAResult_t CAGetLEInterfaceInformation(CALocalConnectivity_t** info, uint32_t* s
     netInfo = (CALocalConnectivity_t *) OICMalloc(sizeof(CALocalConnectivity_t) * netInfoSize);
     if (NULL == netInfo)
     {
-        OIC_LOG_V(ERROR, TAG, "Invalid input..");
+        OIC_LOG(ERROR, TAG, "Invalid input..");
         return CA_MEMORY_ALLOC_FAILED;
     }
     memset(netInfo, 0, sizeof(CALocalConnectivity_t) * netInfoSize);
@@ -281,7 +281,7 @@ CAResult_t CAGetLEInterfaceInformation(CALocalConnectivity_t** info, uint32_t* s
 
 CAResult_t CAReadLEData()
 {
-    OIC_LOG_V(DEBUG, TAG, "Read LE Data");
+    OIC_LOG(DEBUG, TAG, "Read LE Data");
 
     return CA_STATUS_OK;
 }
@@ -291,12 +291,12 @@ CAResult_t CAStopLE()
 
     if (g_isBluetoothGattServer == JNI_FALSE)
     {
-        OIC_LOG_V(DEBUG, TAG, "CA Stop LE Scan");
+        OIC_LOG(DEBUG, TAG, "CA Stop LE Scan");
         CANativeLEStopScan();
     }
     else
     {
-        OIC_LOG_V(DEBUG, TAG, "CA Stop Gatt Server");
+        OIC_LOG(DEBUG, TAG, "CA Stop Gatt Server");
     }
 
     return CA_STATUS_OK;
@@ -306,12 +306,12 @@ void CATerminateLE()
 {
     if (g_isBluetoothGattServer == JNI_FALSE)
     {
-        OIC_LOG_V(DEBUG, TAG, "Terminat Gatt Client");
+        OIC_LOG(DEBUG, TAG, "Terminat Gatt Client");
         CALETerminate();
     }
     else
     {
-        OIC_LOG_V(DEBUG, TAG, "Terminat Gatt Server");
+        OIC_LOG(DEBUG, TAG, "Terminat Gatt Server");
         CALEServerTerminate();
     }
 }
index 710afb2..b142181 100644 (file)
@@ -78,11 +78,11 @@ static u_cond g_threadCond;
 //FIXME getting context
 void CALEClientJNISetContext(JNIEnv *env, jobject context)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALEClientJNISetContext");
+    OIC_LOG(DEBUG, TAG, "CALEClientJNISetContext");
 
     if (context == NULL)
     {
-        OIC_LOG_V(ERROR, TAG, "context is null");
+        OIC_LOG(ERROR, TAG, "context is null");
         return;
     }
 
@@ -91,19 +91,19 @@ void CALEClientJNISetContext(JNIEnv *env, jobject context)
 
 void CALeCreateJniInterfaceObject()
 {
-    OIC_LOG_V(DEBUG, TAG, "CALeCreateJniInterfaceObject");
+    OIC_LOG(DEBUG, TAG, "CALeCreateJniInterfaceObject");
 
     jboolean isAttached = JNI_FALSE;
     JNIEnv* env;
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(ERROR, TAG, "Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = JNI_TRUE;
@@ -112,7 +112,7 @@ void CALeCreateJniInterfaceObject()
     jclass LeJniInterface = (*env)->FindClass(env, "com/iotivity/jar/CALeInterface");
     if (!LeJniInterface)
     {
-        OIC_LOG_V(DEBUG, TAG, "Could not get CALeInterface class");
+        OIC_LOG(DEBUG, TAG, "Could not get CALeInterface class");
         return;
     }
 
@@ -120,12 +120,12 @@ void CALeCreateJniInterfaceObject()
                                                                  "(Landroid/content/Context;)V");
     if (!LeInterfaceConstructorMethod)
     {
-        OIC_LOG_V(DEBUG, TAG, "Could not get CALeInterface constructor method");
+        OIC_LOG(DEBUG, TAG, "Could not get CALeInterface constructor method");
         return;
     }
 
     (*env)->NewObject(env, LeJniInterface, LeInterfaceConstructorMethod, g_context);
-    OIC_LOG_V(DEBUG, TAG, "Create CALeInterface instance");
+    OIC_LOG(DEBUG, TAG, "Create CALeInterface instance");
 
     if (isAttached)
     {
@@ -135,7 +135,7 @@ void CALeCreateJniInterfaceObject()
 
 JNIEXPORT jint JNI_OnLoad(JavaVM *jvm, void *reserved)
 {
-    OIC_LOG_V(DEBUG, TAG, "JNI_OnLoad in calecore");
+    OIC_LOG(DEBUG, TAG, "JNI_OnLoad in calecore");
 
     JNIEnv* env;
     if ((*jvm)->GetEnv(jvm, (void**) &env, JNI_VERSION_1_6) != JNI_OK)
@@ -154,7 +154,7 @@ JNIEXPORT jint JNI_OnLoad(JavaVM *jvm, void *reserved)
 
 void JNI_OnUnload(JavaVM *jvm, void *reserved)
 {
-    OIC_LOG_V(DEBUG, TAG, "JNI_OnUnload in calecore");
+    OIC_LOG(DEBUG, TAG, "JNI_OnUnload in calecore");
 
     JNIEnv* env;
     if ((*jvm)->GetEnv(jvm, (void**) &env, JNI_VERSION_1_6) != JNI_OK)
@@ -189,12 +189,12 @@ void CALETerminate()
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(ERROR, TAG, "Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = JNI_TRUE;
@@ -252,7 +252,7 @@ void CALETerminate()
 
 void CANativeSendFinish(JNIEnv *env, jobject gatt)
 {
-    OIC_LOG_V(DEBUG, TAG, "CANativeSendFinish");
+    OIC_LOG(DEBUG, TAG, "CANativeSendFinish");
 
     if (gatt)
     {
@@ -284,11 +284,11 @@ CAResult_t CALEStartUnicastServer(const char* address)
 
 CAResult_t CALEStartMulticastServer()
 {
-    OIC_LOG_V(DEBUG, TAG, "CALEStartMulticastServer");
+    OIC_LOG(DEBUG, TAG, "CALEStartMulticastServer");
 
     if (g_isStartServer)
     {
-        OIC_LOG_V(ERROR, TAG, "server is already started..it will be skipped");
+        OIC_LOG(ERROR, TAG, "server is already started..it will be skipped");
         return CA_STATUS_FAILED;
     }
 
@@ -297,12 +297,12 @@ CAResult_t CALEStartMulticastServer()
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(ERROR, TAG, "Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return CA_STATUS_FAILED;
         }
         isAttached = JNI_TRUE;
@@ -350,11 +350,11 @@ void CALEGetLocalAddress(char** address)
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(ERROR, TAG, "Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = JNI_TRUE;
@@ -389,11 +389,11 @@ CAResult_t CALESendUnicastMessageImpl(const char* address, const char* data, con
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(ERROR, TAG, "Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return CA_STATUS_FAILED;
         }
         isAttached = JNI_TRUE;
@@ -465,11 +465,11 @@ CAResult_t CALESendMulticastMessageImpl(const char* data, const uint32_t dataLen
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(ERROR, TAG, "Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return CA_STATUS_FAILED;
         }
         isAttached = JNI_TRUE;
@@ -617,7 +617,7 @@ void CANativeLEStartScan()
 {
     if (!g_isStartServer)
     {
-        OIC_LOG_V(DEBUG, TAG, "server is not started yet..scan will be passed");
+        OIC_LOG(DEBUG, TAG, "server is not started yet..scan will be passed");
         return;
     }
 
@@ -626,12 +626,12 @@ void CANativeLEStartScan()
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(ERROR, TAG, "Could not get JNIEnv pointer");
 
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = TRUE;
@@ -813,11 +813,11 @@ void CANativeLEStopScan()
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(ERROR, TAG, "Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = TRUE;
@@ -976,7 +976,7 @@ void CANativeLEDisconnect(JNIEnv *env, jobject bluetoothGatt)
 
 void CANativeLEDisconnectAll(JNIEnv *env)
 {
-    OIC_LOG_V(DEBUG, TAG, "CANativeLEDisconnectAll");
+    OIC_LOG(DEBUG, TAG, "CANativeLEDisconnectAll");
 
     if (!g_gattObjectList)
     {
@@ -1338,12 +1338,12 @@ void CANativeCreateUUIDList()
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(ERROR, TAG, "Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = TRUE;
@@ -1388,7 +1388,7 @@ void CANativeCreateScanDeviceList(JNIEnv *env)
     // create new object array
     if (g_deviceList == NULL)
     {
-        OIC_LOG_V(DEBUG, TAG, "Create device list");
+        OIC_LOG(DEBUG, TAG, "Create device list");
 
         g_deviceList = u_arraylist_create();
     }
@@ -1421,7 +1421,7 @@ void CANativeAddScanDeviceToList(JNIEnv *env, jobject device)
     {
         jobject gdevice = (*env)->NewGlobalRef(env, device);
         u_arraylist_add(g_deviceList, gdevice);
-        OIC_LOG_V(DEBUG, TAG, "Set Object to Array as Element");
+        OIC_LOG(DEBUG, TAG, "Set Object to Array as Element");
     }
 }
 
@@ -1450,18 +1450,18 @@ jboolean CANativeIsDeviceInList(JNIEnv *env, const char* remoteAddress)
 
         if (!strcmp(remoteAddress, setAddress))
         {
-            OIC_LOG_V(DEBUG, TAG, "the device is already set");
+            OIC_LOG(DEBUG, TAG, "the device is already set");
             return TRUE;
         }
     }
 
-    OIC_LOG_V(DEBUG, TAG, "there are no the device in list. we can add");
+    OIC_LOG(DEBUG, TAG, "there are no the device in list. we can add");
     return FALSE;
 }
 
 void CANativeRemoveAllDevices(JNIEnv *env)
 {
-    OIC_LOG_V(DEBUG, TAG, "CANativeRemoveAllDevices");
+    OIC_LOG(DEBUG, TAG, "CANativeRemoveAllDevices");
 
     if (!g_deviceList)
     {
@@ -1488,7 +1488,7 @@ void CANativeRemoveAllDevices(JNIEnv *env)
 
 void CANativeRemoveDevice(JNIEnv *env, jstring address)
 {
-    OIC_LOG_V(DEBUG, TAG, "CANativeRemoveDevice");
+    OIC_LOG(DEBUG, TAG, "CANativeRemoveDevice");
 
     if (!g_deviceList)
     {
@@ -1554,7 +1554,7 @@ void CANativeCreateGattObjList(JNIEnv *env)
     // create new object array
     if (g_gattObjectList == NULL)
     {
-        OIC_LOG_V(DEBUG, TAG, "Create Gatt object list");
+        OIC_LOG(DEBUG, TAG, "Create Gatt object list");
 
         g_gattObjectList = u_arraylist_create();
     }
@@ -1589,7 +1589,7 @@ void CANativeAddGattobjToList(JNIEnv *env, jobject gatt)
     {
         jobject gGatt = (*env)->NewGlobalRef(env, gatt);
         u_arraylist_add(g_gattObjectList, gGatt);
-        OIC_LOG_V(DEBUG, TAG, "Set Object to Array as Element");
+        OIC_LOG(DEBUG, TAG, "Set Object to Array as Element");
     }
 }
 
@@ -1619,7 +1619,7 @@ jboolean CANativeIsGattObjInList(JNIEnv *env, const char* remoteAddress)
 
         if (!strcmp(remoteAddress, setAddress))
         {
-            OIC_LOG_V(DEBUG, TAG, "the device is already set");
+            OIC_LOG(DEBUG, TAG, "the device is already set");
             return TRUE;
         }
         else
@@ -1628,13 +1628,13 @@ jboolean CANativeIsGattObjInList(JNIEnv *env, const char* remoteAddress)
         }
     }
 
-    OIC_LOG_V(DEBUG, TAG, "there are no the gatt obejct in list. we can add");
+    OIC_LOG(DEBUG, TAG, "there are no the gatt obejct in list. we can add");
     return FALSE;
 }
 
 void CANativeRemoveAllGattObjsList(JNIEnv *env)
 {
-    OIC_LOG_V(DEBUG, TAG, "CANativeRemoveAllGattObjsList");
+    OIC_LOG(DEBUG, TAG, "CANativeRemoveAllGattObjsList");
 
     if (!g_gattObjectList)
     {
@@ -1661,7 +1661,7 @@ void CANativeRemoveAllGattObjsList(JNIEnv *env)
 
 void CANativeRemoveGattObj(JNIEnv *env, jobject gatt)
 {
-    OIC_LOG_V(DEBUG, TAG, "CANativeRemoveGattObj");
+    OIC_LOG(DEBUG, TAG, "CANativeRemoveGattObj");
 
     if (!g_gattObjectList)
     {
@@ -1757,7 +1757,7 @@ JNIEXPORT void JNICALL
 Java_com_iotivity_jar_caleinterface_CARegisterLeScanCallback(JNIEnv *env, jobject obj,
                                                              jobject callback)
 {
-    OIC_LOG_V(DEBUG, TAG, "CARegisterLeScanCallback");
+    OIC_LOG(DEBUG, TAG, "CARegisterLeScanCallback");
 
     g_leScanCallback = (*env)->NewGlobalRef(env, callback);
 }
@@ -1766,7 +1766,7 @@ JNIEXPORT void JNICALL
 Java_com_iotivity_jar_caleinterface_CARegisterLeGattCallback(JNIEnv *env, jobject obj,
                                                              jobject callback)
 {
-    OIC_LOG_V(DEBUG, TAG, "CARegisterLeGattCallback");
+    OIC_LOG(DEBUG, TAG, "CARegisterLeGattCallback");
 
     g_leGattCallback = (*env)->NewGlobalRef(env, callback);
 }
@@ -1909,7 +1909,7 @@ Java_com_iotivity_jar_caleinterface_CALeGattCharacteristicChangedCallback(JNIEnv
                                                                           jobject characteristic,
                                                                           jbyteArray data)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALeGattCharacteristicChangedCallback");
+    OIC_LOG(DEBUG, TAG, "CALeGattCharacteristicChangedCallback");
 
     // get Byte Array and covert to char*
     jint length = (*env)->GetArrayLength(env, data);
@@ -1920,7 +1920,7 @@ Java_com_iotivity_jar_caleinterface_CALeGattCharacteristicChangedCallback(JNIEnv
     char* recevicedData = (char*) OICMalloc(sizeof(char) * length);
     if (NULL == recevicedData)
     {
-        OIC_LOG_V(ERROR, TAG, "recevicedData is null");
+        OIC_LOG(ERROR, TAG, "recevicedData is null");
         CANativeSendFinish(env, gatt);
 
         return;
index 34ada97..e626192 100644 (file)
@@ -35,11 +35,11 @@ static CALENetStateChantedCallback g_networkChangeCb = NULL;
 //getting context
 void CALENetworkMonitorJNISetContext(JNIEnv *env, jobject context)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALENetworkMonitorJNISetContext");
+    OIC_LOG(DEBUG, TAG, "CALENetworkMonitorJNISetContext");
 
     if (context == NULL)
     {
-        OIC_LOG_V(DEBUG, TAG, "context is null");
+        OIC_LOG(DEBUG, TAG, "context is null");
     }
 
     g_context = (*env)->NewGlobalRef(env, context);
@@ -48,13 +48,13 @@ void CALENetworkMonitorJNISetContext(JNIEnv *env, jobject context)
 //getting jvm
 void CALeNetworkMonitorJniInit(JNIEnv *env, JavaVM *jvm)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALeNetworkMonitorJniInit");
+    OIC_LOG(DEBUG, TAG, "CALeNetworkMonitorJniInit");
     g_jvm = jvm;
 }
 
 void CALESetNetStateCallback(CALENetStateChantedCallback callback)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALESetNetStateCallback");
+    OIC_LOG(DEBUG, TAG, "CALESetNetStateCallback");
     g_networkChangeCb = callback;
 }
 
@@ -62,11 +62,11 @@ JNIEXPORT void JNICALL
 Java_com_iotivity_jar_caleinterface_CALeStateChangedCallback(JNIEnv *env, jobject obj, jint status)
 {
     // STATE_ON:12, STATE_OFF:10
-    OIC_LOG_V(DEBUG, TAG, "CALeInterface - Network State Changed");
+    OIC_LOG(DEBUG, TAG, "CALeInterface - Network State Changed");
 
     if (g_networkChangeCb == NULL)
     {
-        OIC_LOG_V(DEBUG, TAG, "g_networkChangeCb is null", status);
+        OIC_LOG(DEBUG, TAG, "g_networkChangeCb is null", status);
     }
 
     jstring jni_address = CALEGetLocalDeviceAddress(env);
index 488a753..0bb7420 100644 (file)
@@ -56,11 +56,11 @@ static jboolean g_isSendingMulticastData;
 //getting context
 void CALEServerJNISetContext(JNIEnv *env, jobject context)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALEServerJNISetContext");
+    OIC_LOG(DEBUG, TAG, "CALEServerJNISetContext");
 
     if (context == NULL)
     {
-        OIC_LOG_V(ERROR, TAG, "context is null");
+        OIC_LOG(ERROR, TAG, "context is null");
     }
 
     g_context = (*env)->NewGlobalRef(env, context);
@@ -69,7 +69,7 @@ void CALEServerJNISetContext(JNIEnv *env, jobject context)
 //getting jvm
 void CALeServerJniInit(JNIEnv *env, JavaVM *jvm)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALeServerJniInit");
+    OIC_LOG(DEBUG, TAG, "CALeServerJniInit");
     g_jvm = jvm;
 }
 
@@ -81,7 +81,7 @@ jobject CANativeLEServerSetResponseData(JNIEnv *env, jbyteArray responseData)
         return NULL;
     }
 
-    OIC_LOG_V(DEBUG, TAG, "CALEServerSetResponseData");
+    OIC_LOG(DEBUG, TAG, "CALEServerSetResponseData");
 
     jclass jni_cid_bluetoothGattServer = (*env)->FindClass(env,
                                                            "android/bluetooth/BluetoothGattServer");
@@ -100,7 +100,7 @@ jobject CANativeLEServerSetResponseData(JNIEnv *env, jbyteArray responseData)
 
     if (!g_bluetoothGattServer)
     {
-        OIC_LOG_V(ERROR, TAG, "Check BluetoothGattServer status");
+        OIC_LOG(ERROR, TAG, "Check BluetoothGattServer status");
         return NULL;
     }
     jobject jni_obj_bluetoothGattService = (*env)->CallObjectMethod(env, g_bluetoothGattServer,
@@ -126,7 +126,7 @@ jobject CANativeLEServerSetResponseData(JNIEnv *env, jbyteArray responseData)
 
     if (jni_boolean_setValue == JNI_FALSE)
     {
-        OIC_LOG_V(ERROR, TAG, "Fail to set response data");
+        OIC_LOG(ERROR, TAG, "Fail to set response data");
     }
 
     return jni_obj_bluetoothGattCharacteristic;
@@ -141,7 +141,7 @@ CAResult_t CANativeLEServerSendResponseData(JNIEnv *env, jobject device, jobject
         return CA_ADAPTER_NOT_ENABLED;
     }
 
-    OIC_LOG_V(DEBUG, TAG, "CALEServerSendResponseData");
+    OIC_LOG(DEBUG, TAG, "CALEServerSendResponseData");
 
     jclass jni_cid_bluetoothGattServer = (*env)->FindClass(env,
                                                            "android/bluetooth/BluetoothGattServer");
@@ -157,7 +157,7 @@ CAResult_t CANativeLEServerSendResponseData(JNIEnv *env, jobject device, jobject
 
     if (jni_boolean_notifyCharacteristicChanged == JNI_FALSE)
     {
-        OIC_LOG_V(ERROR, TAG, "Fail to notify characteristic");
+        OIC_LOG(ERROR, TAG, "Fail to notify characteristic");
         return CA_SEND_FAILED;
     }
 
@@ -174,7 +174,7 @@ CAResult_t CANativeLEServerSendResponse(JNIEnv *env, jobject device, jint reques
         return CA_ADAPTER_NOT_ENABLED;
     }
 
-    OIC_LOG_V(DEBUG, TAG, "CALEServerSendResponse");
+    OIC_LOG(DEBUG, TAG, "CALEServerSendResponse");
 
     jclass jni_cid_bluetoothGattServer = (*env)->FindClass(env,
                                                            "android/bluetooth/BluetoothGattServer");
@@ -189,7 +189,7 @@ CAResult_t CANativeLEServerSendResponse(JNIEnv *env, jobject device, jint reques
 
     if (jni_boolean_sendResponse == JNI_FALSE)
     {
-        OIC_LOG_V(ERROR, TAG, "Fail to send response for gatt characteristic write request");
+        OIC_LOG(ERROR, TAG, "Fail to send response for gatt characteristic write request");
         return CA_SEND_FAILED;
     }
 
@@ -199,7 +199,7 @@ CAResult_t CANativeLEServerSendResponse(JNIEnv *env, jobject device, jint reques
 void CANativeLEServerStartAdvertise(JNIEnv *env, jobject advertiseCallback)
 {
 
-    OIC_LOG_V(DEBUG, TAG, "LEServerStartAdvertise");
+    OIC_LOG(DEBUG, TAG, "LEServerStartAdvertise");
 
     if (!CALEIsEnableBTAdapter(env))
     {
@@ -299,13 +299,13 @@ void CANativeLEServerStartAdvertise(JNIEnv *env, jobject advertiseCallback)
                            jni_obj_build_LeAdvertiseSettings, jni_obj_build_LeAdvertiseData,
                            advertiseCallback);
 
-    OIC_LOG_V(DEBUG, TAG, "Advertising started!!");
+    OIC_LOG(DEBUG, TAG, "Advertising started!!");
 }
 
 void CANativeLEServerStopAdvertise(JNIEnv *env, jobject advertiseCallback)
 {
 
-    OIC_LOG_V(DEBUG, TAG, "LEServerStopAdvertise");
+    OIC_LOG(DEBUG, TAG, "LEServerStopAdvertise");
 
     if (!CALEIsEnableBTAdapter(env))
     {
@@ -338,13 +338,13 @@ void CANativeLEServerStopAdvertise(JNIEnv *env, jobject advertiseCallback)
     (*env)->CallVoidMethod(env, jni_obj_getBluetoothLeAdvertiser, jni_mid_stopAdvertising,
                            advertiseCallback);
 
-    OIC_LOG_V(DEBUG, TAG, "Advertising stopped!!");
+    OIC_LOG(DEBUG, TAG, "Advertising stopped!!");
 }
 
 CAResult_t CALEStartGattServer(JNIEnv *env, jobject gattServerCallback)
 {
 
-    OIC_LOG_V(DEBUG, TAG, "CALEStartGattServer");
+    OIC_LOG(DEBUG, TAG, "CALEStartGattServer");
 
     if (!CALEIsEnableBTAdapter(env))
     {
@@ -354,7 +354,7 @@ CAResult_t CALEStartGattServer(JNIEnv *env, jobject gattServerCallback)
 
     if (g_isStartServer)
     {
-        OIC_LOG_V(DEBUG, TAG, "Gatt server already started");
+        OIC_LOG(DEBUG, TAG, "Gatt server already started");
     }
 
     g_bluetoothGattServerCallback = (*env)->NewGlobalRef(env, gattServerCallback);
@@ -363,7 +363,7 @@ CAResult_t CALEStartGattServer(JNIEnv *env, jobject gattServerCallback)
     jobject bluetoothGattServer = CANativeLEServerOpenGattServer(env);
     if (!bluetoothGattServer)
     {
-        OIC_LOG_V(ERROR, TAG, "bluetoothGattServer is null");
+        OIC_LOG(ERROR, TAG, "bluetoothGattServer is null");
         return CA_STATUS_FAILED;
     }
 
@@ -379,7 +379,7 @@ CAResult_t CALEStartGattServer(JNIEnv *env, jobject gattServerCallback)
 jobject CANativeLEServerOpenGattServer(JNIEnv *env)
 {
 
-    OIC_LOG_V(DEBUG, TAG, "CALEServerOpenGattServer");
+    OIC_LOG(DEBUG, TAG, "CALEServerOpenGattServer");
 
     if (!CALEIsEnableBTAdapter(env))
     {
@@ -407,7 +407,7 @@ jobject CANativeLEServerOpenGattServer(JNIEnv *env)
                                                                     jni_fid_bluetoothService);
     if (!jni_obj_bluetoothService)
     {
-        OIC_LOG_V(ERROR, TAG, "jni_obj_bluetoothService is null");
+        OIC_LOG(ERROR, TAG, "jni_obj_bluetoothService is null");
         return JNI_FALSE;
     }
 
@@ -416,7 +416,7 @@ jobject CANativeLEServerOpenGattServer(JNIEnv *env)
                                                                 jni_obj_bluetoothService);
     if (!jni_obj_bluetoothManager)
     {
-        OIC_LOG_V(ERROR, TAG, "jni_obj_bluetoothManager is null");
+        OIC_LOG(ERROR, TAG, "jni_obj_bluetoothManager is null");
         return JNI_FALSE;
     }
 
@@ -426,7 +426,7 @@ jobject CANativeLEServerOpenGattServer(JNIEnv *env)
                                                                    g_bluetoothGattServerCallback);
     if (!jni_obj_bluetoothGattServer)
     {
-        OIC_LOG_V(ERROR, TAG, "jni_obj_bluetoothGattServer is null");
+        OIC_LOG(ERROR, TAG, "jni_obj_bluetoothGattServer is null");
         return JNI_FALSE;
     }
 
@@ -436,7 +436,7 @@ jobject CANativeLEServerOpenGattServer(JNIEnv *env)
 jobject CANativeLEServerCreateGattService(JNIEnv *env)
 {
 
-    OIC_LOG_V(DEBUG, TAG, "CALEServerCreateGattService");
+    OIC_LOG(DEBUG, TAG, "CALEServerCreateGattService");
 
     if (!CALEIsEnableBTAdapter(env))
     {
@@ -525,7 +525,7 @@ jobject CANativeLEServerCreateGattService(JNIEnv *env)
 
     if (jni_boolean_addWriteCharacteristic == JNI_FALSE)
     {
-        OIC_LOG_V(ERROR, TAG, "Fail to add jni_boolean_addReadCharacteristic");
+        OIC_LOG(ERROR, TAG, "Fail to add jni_boolean_addReadCharacteristic");
         return NULL;
     }
 
@@ -536,7 +536,7 @@ CAResult_t CANativeLEServerAddGattService(JNIEnv *env, jobject bluetoothGattServ
                                           jobject bluetoothGattService)
 {
 
-    OIC_LOG_V(DEBUG, TAG, "CALEServerAddGattService");
+    OIC_LOG(DEBUG, TAG, "CALEServerAddGattService");
 
     if (!CALEIsEnableBTAdapter(env))
     {
@@ -557,7 +557,7 @@ CAResult_t CANativeLEServerAddGattService(JNIEnv *env, jobject bluetoothGattServ
 
     if (jni_boolean_addService == JNI_FALSE)
     {
-        OIC_LOG_V(ERROR, TAG, "Fail to add gatt service");
+        OIC_LOG(ERROR, TAG, "Fail to add gatt service");
         return CA_STATUS_FAILED;
     }
 
@@ -567,7 +567,7 @@ CAResult_t CANativeLEServerAddGattService(JNIEnv *env, jobject bluetoothGattServ
 CAResult_t CANativeLEServerConnect(JNIEnv *env, jobject bluetoothDevice)
 {
 
-    OIC_LOG_V(DEBUG, TAG, "CALEConnect");
+    OIC_LOG(DEBUG, TAG, "CALEConnect");
 
     if (!CALEIsEnableBTAdapter(env))
     {
@@ -587,7 +587,7 @@ CAResult_t CANativeLEServerConnect(JNIEnv *env, jobject bluetoothDevice)
 
     if (jni_boolean_connect == JNI_FALSE)
     {
-        OIC_LOG_V(ERROR, TAG, "Fail to connect");
+        OIC_LOG(ERROR, TAG, "Fail to connect");
         return CA_STATUS_FAILED;
     }
 
@@ -597,7 +597,7 @@ CAResult_t CANativeLEServerConnect(JNIEnv *env, jobject bluetoothDevice)
 void CANativeLEServerDisconnect(JNIEnv *env, jobject bluetoothDevice)
 {
 
-    OIC_LOG_V(DEBUG, TAG, "CALEDisconnect");
+    OIC_LOG(DEBUG, TAG, "CALEDisconnect");
 
     if (!CALEIsEnableBTAdapter(env))
     {
@@ -618,7 +618,7 @@ void CANativeLEServerDisconnect(JNIEnv *env, jobject bluetoothDevice)
 CAResult_t CALEServerSend(JNIEnv *env, jobject bluetoothDevice, jbyteArray responseData)
 {
 
-    OIC_LOG_V(DEBUG, TAG, "CALESend");
+    OIC_LOG(DEBUG, TAG, "CALESend");
 
     if (!CALEIsEnableBTAdapter(env))
     {
@@ -632,7 +632,7 @@ CAResult_t CALEServerSend(JNIEnv *env, jobject bluetoothDevice, jbyteArray respo
 
     if (result != CA_STATUS_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Fail to send response data");
+        OIC_LOG(ERROR, TAG, "Fail to send response data");
         return result;
     }
 
@@ -641,19 +641,19 @@ CAResult_t CALEServerSend(JNIEnv *env, jobject bluetoothDevice, jbyteArray respo
 
 void CALeServerCreateJniInterfaceObject()
 {
-    OIC_LOG_V(DEBUG, TAG, "CALeServerCreateJniInterfaceObject");
+    OIC_LOG(DEBUG, TAG, "CALeServerCreateJniInterfaceObject");
 
     jboolean isAttached = JNI_FALSE;
     JNIEnv* env;
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(DEBUG, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(DEBUG, TAG, "Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = JNI_TRUE;
@@ -687,12 +687,12 @@ void CALEServerTerminate()
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(ERROR, TAG, "Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = JNI_TRUE;
@@ -739,12 +739,12 @@ CAResult_t CALEServerSendUnicastMessage(const char* address, const char* data, u
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(ERROR, TAG, "Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return CA_STATUS_FAILED;
         }
         isAttached = JNI_TRUE;
@@ -769,12 +769,12 @@ CAResult_t CALEServerSendMulticastMessage(const char* data, uint32_t dataLen)
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(ERROR, TAG, "Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return CA_STATUS_FAILED;
         }
         isAttached = JNI_TRUE;
@@ -799,11 +799,11 @@ CAResult_t CALEServerStartUnicastServer(const char* address)
 
 CAResult_t CALEServerStartMulticastServer()
 {
-    OIC_LOG_V(DEBUG, TAG, "CALEServerStartMulticastServer");
+    OIC_LOG(DEBUG, TAG, "CALEServerStartMulticastServer");
 
     if (g_isStartServer)
     {
-        OIC_LOG_V(ERROR, TAG, "server is already started..it will be skipped");
+        OIC_LOG(ERROR, TAG, "server is already started..it will be skipped");
         return CA_STATUS_FAILED;
     }
 
@@ -812,12 +812,12 @@ CAResult_t CALEServerStartMulticastServer()
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(ERROR, TAG, "Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return CA_STATUS_FAILED;
         }
         isAttached = JNI_TRUE;
@@ -829,7 +829,7 @@ CAResult_t CALEServerStartMulticastServer()
     CAResult_t ret = CALEStartGattServer(env, g_bluetoothGattServerCallback);
     if (CA_STATUS_OK != ret)
     {
-        OIC_LOG_V(ERROR, TAG, "Fail to start gatt server");
+        OIC_LOG(ERROR, TAG, "Fail to start gatt server");
         return ret;
     }
 
@@ -857,7 +857,7 @@ CAResult_t CALEServerStopMulticastServer()
 
     if (g_isStartServer == JNI_FALSE)
     {
-        OIC_LOG_V(ERROR, TAG, "server is already stopped..it will be skipped");
+        OIC_LOG(ERROR, TAG, "server is already stopped..it will be skipped");
         return CA_STATUS_FAILED;
     }
 
@@ -866,12 +866,12 @@ CAResult_t CALEServerStopMulticastServer()
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(ERROR, TAG, "Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
 
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return CA_STATUS_FAILED;
         }
         isAttached = JNI_TRUE;
@@ -910,11 +910,11 @@ void CALEServerGetLocalAddress(char* address)
     jint res = (*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6);
     if (res != JNI_OK)
     {
-        OIC_LOG_V(ERROR, TAG, "Could not get JNIEnv pointer");
+        OIC_LOG(ERROR, TAG, "Could not get JNIEnv pointer");
         res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
         if (res != JNI_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "AttachCurrentThread failed");
+            OIC_LOG(ERROR, TAG, "AttachCurrentThread failed");
             return;
         }
         isAttached = JNI_TRUE;
@@ -924,7 +924,7 @@ void CALEServerGetLocalAddress(char* address)
     const char* localAddress = (*env)->GetStringUTFChars(env, jni_address, NULL);
     if (NULL == localAddress)
     {
-        OIC_LOG_V(ERROR, TAG, "there are no local address");
+        OIC_LOG(ERROR, TAG, "there are no local address");
         return;
     }
 
@@ -1043,7 +1043,7 @@ void CALEServerCreateCachedDeviceList()
     // create new object array
     if (g_connectedDeviceList == NULL)
     {
-        OIC_LOG_V(DEBUG, TAG, "Create device list");
+        OIC_LOG(DEBUG, TAG, "Create device list");
 
         g_connectedDeviceList = u_arraylist_create();
     }
@@ -1081,7 +1081,7 @@ jboolean CALEServerIsDeviceInList(JNIEnv *env, const char* remoteAddress)
 
         if (!strcmp(remoteAddress, setAddress))
         {
-            OIC_LOG_V(DEBUG, TAG, "the device is already set");
+            OIC_LOG(DEBUG, TAG, "the device is already set");
             return JNI_TRUE;
         }
         else
@@ -1090,7 +1090,7 @@ jboolean CALEServerIsDeviceInList(JNIEnv *env, const char* remoteAddress)
         }
     }
 
-    OIC_LOG_V(DEBUG, TAG, "no device in list");
+    OIC_LOG(DEBUG, TAG, "no device in list");
     return JNI_FALSE;
 }
 
@@ -1121,13 +1121,13 @@ void CALEServerAddDeviceToList(JNIEnv *env, jobject device)
     {
         jobject gdevice = (*env)->NewGlobalRef(env, device);
         u_arraylist_add(g_connectedDeviceList, gdevice);
-        OIC_LOG_V(DEBUG, TAG, "Set Object to Array as Element");
+        OIC_LOG(DEBUG, TAG, "Set Object to Array as Element");
     }
 }
 
 void CALEServerRemoveAllDevices(JNIEnv *env)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALEServerRemoveAllDevices");
+    OIC_LOG(DEBUG, TAG, "CALEServerRemoveAllDevices");
 
     if (!g_connectedDeviceList)
     {
@@ -1153,7 +1153,7 @@ void CALEServerRemoveAllDevices(JNIEnv *env)
 
 void CALEServerRemoveDevice(JNIEnv *env, jstring address)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALEServerRemoveDevice");
+    OIC_LOG(DEBUG, TAG, "CALEServerRemoveDevice");
 
     if (!g_connectedDeviceList)
     {
@@ -1220,7 +1220,7 @@ Java_com_iotivity_jar_caleinterface_CALeGattServerCharacteristicReadRequestCallb
         JNIEnv *env, jobject obj, jobject device, jint requestId, jint offset,
         jobject characteristic, jbyteArray data)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALeInterface - Gatt Server Characteristic Read Request Callback");
+    OIC_LOG(DEBUG, TAG, "CALeInterface - Gatt Server Characteristic Read Request Callback");
 
     CANativeLEServerSendResponse(env, device, requestId, 0, offset, NULL);
 }
@@ -1231,13 +1231,13 @@ Java_com_iotivity_jar_caleinterface_CALeGattServerCharacteristicWriteRequestCall
         jbyteArray data, jboolean preparedWrite, jboolean responseNeeded, jint offset,
         jbyteArray value)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALeInterface - Gatt Server Characteristic Write Request Callback");
+    OIC_LOG(DEBUG, TAG, "CALeInterface - Gatt Server Characteristic Write Request Callback");
 
     CANativeLEServerSendResponse(env, device, requestId, 0, offset, value);
 
     if (data == NULL)
     {
-        OIC_LOG_V(ERROR, TAG, "Reqeust data is null");
+        OIC_LOG(ERROR, TAG, "Reqeust data is null");
         return;
     }
 
@@ -1251,7 +1251,7 @@ Java_com_iotivity_jar_caleinterface_CALeGattServerCharacteristicWriteRequestCall
     requestData = (char*) OICCalloc(1, length + 1);
     if (NULL == requestData)
     {
-        OIC_LOG_V(ERROR, TAG, "requestData is null");
+        OIC_LOG(ERROR, TAG, "requestData is null");
         return;
     }
 
@@ -1274,7 +1274,7 @@ Java_com_iotivity_jar_caleinterface_CALeGattServerDescriptorReadRequestCallback(
                                                                                 jint offset,
                                                                                 jobject descriptor)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALeInterface_CALeGattServerDescriptorReadRequestCallback");
+    OIC_LOG(DEBUG, TAG, "CALeInterface_CALeGattServerDescriptorReadRequestCallback");
 }
 
 JNIEXPORT void JNICALL
@@ -1282,7 +1282,7 @@ Java_com_iotivity_jar_caleinterface_CALeGattServerDescriptorWriteRequestCallback
         JNIEnv *env, jobject obj, jobject device, jint requestId, jobject descriptor,
         jboolean preparedWrite, jboolean responseNeeded, jint offset, jbyteArray value)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALeInterface_CALeGattServerDescriptorWriteRequestCallback");
+    OIC_LOG(DEBUG, TAG, "CALeInterface_CALeGattServerDescriptorWriteRequestCallback");
 }
 
 JNIEXPORT void JNICALL
@@ -1291,7 +1291,7 @@ Java_com_iotivity_jar_caleinterface_CALeGattServerExecuteWriteCallback(JNIEnv *e
                                                                        jint requestId,
                                                                        jboolean execute)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALeInterface_CALeGattServerExecuteWriteCallback");
+    OIC_LOG(DEBUG, TAG, "CALeInterface_CALeGattServerExecuteWriteCallback");
 
     CANativeLEServerSendResponse(env, device, requestId, 0, 0, NULL);
 }
@@ -1301,14 +1301,14 @@ Java_com_iotivity_jar_caleinterface_CALeGattServerNotificationSentCallback(JNIEn
                                                                            jobject device,
                                                                            jint status)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALeInterface - Gatt Server Notification Sent Callback");
+    OIC_LOG(DEBUG, TAG, "CALeInterface - Gatt Server Notification Sent Callback");
 }
 
 JNIEXPORT void JNICALL
 Java_com_iotivity_jar_caleinterface_CALeAdvertiseStartSuccessCallback(JNIEnv *env, jobject obj,
                                                                       jobject settingsInEffect)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALeInterface - LE Advertise Start Success Callback");
+    OIC_LOG(DEBUG, TAG, "CALeInterface - LE Advertise Start Success Callback");
 }
 
 JNIEXPORT void JNICALL
@@ -1322,7 +1322,7 @@ JNIEXPORT void JNICALL
 Java_com_iotivity_jar_caleinterface_CARegisterLeGattServerCallback(JNIEnv *env, jobject obj,
                                                                    jobject callback)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALeInterface - Register Le Gatt Server Callback");
+    OIC_LOG(DEBUG, TAG, "CALeInterface - Register Le Gatt Server Callback");
 
     g_bluetoothGattServerCallback = (*env)->NewGlobalRef(env, callback);
 }
@@ -1331,7 +1331,7 @@ JNIEXPORT void JNICALL
 Java_com_iotivity_jar_caleinterface_CARegisterBluetoothLeAdvertiseCallback(JNIEnv *env, jobject obj,
                                                                            jobject callback)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALeInterface - Register Le Advertise Callback");
+    OIC_LOG(DEBUG, TAG, "CALeInterface - Register Le Advertise Callback");
 
     g_leAdvertiseCallback = (*env)->NewGlobalRef(env, callback);
 }
@@ -1343,7 +1343,7 @@ Java_com_iotivity_jar_caleinterface_CALeGattServerConnectionStateChangeCallback(
                                                                                 jint status,
                                                                                 jint newState)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALeInterface - Gatt Server ConnectionStateChange Callback");
+    OIC_LOG(DEBUG, TAG, "CALeInterface - Gatt Server ConnectionStateChange Callback");
 
     OIC_LOG_V(DEBUG, TAG, "New connection State: %d", newState);
 
@@ -1372,7 +1372,7 @@ Java_com_iotivity_jar_caleinterface_CALeGattServerConnectionStateChangeCallback(
     if (newState == jni_int_state_connected)
     {
 
-        OIC_LOG_V(DEBUG, TAG, "LE CONNECTED");
+        OIC_LOG(DEBUG, TAG, "LE CONNECTED");
 
         jstring jni_remoteAddress = CALEGetAddressFromBTDevice(env, device);
         if (!jni_remoteAddress)
@@ -1385,18 +1385,18 @@ Java_com_iotivity_jar_caleinterface_CALeGattServerConnectionStateChangeCallback(
 
         if (g_connectedDeviceList == NULL)
         {
-            OIC_LOG_V(ERROR, TAG, "g_connectedDeviceList is null");
+            OIC_LOG(ERROR, TAG, "g_connectedDeviceList is null");
         }
 
         if (CALEServerIsDeviceInList(env, remoteAddress) == JNI_FALSE)
         {
-            OIC_LOG_V(DEBUG, TAG, "add connected device to cache");
+            OIC_LOG(DEBUG, TAG, "add connected device to cache");
             CALEServerAddDeviceToList(env, device);
         }
     }
     else if (newState == jni_int_state_disconnected)
     {
-        OIC_LOG_V(DEBUG, TAG, "LE DISCONNECTED");
+        OIC_LOG(DEBUG, TAG, "LE DISCONNECTED");
     }
 }
 
index f4e757c..b585887 100644 (file)
@@ -36,7 +36,7 @@
 jobject CALEGetUuidFromString(JNIEnv *env, const char* uuid)
 {
 
-    OIC_LOG_V(DEBUG, TAG, "CALEGetUuidFromString");
+    OIC_LOG(DEBUG, TAG, "CALEGetUuidFromString");
 
     jclass jni_cid_UUID = (*env)->FindClass(env, "java/util/UUID");
 
@@ -49,7 +49,7 @@ jobject CALEGetUuidFromString(JNIEnv *env, const char* uuid)
                                                           str_uuid);
     if (!jni_obj_uuid)
     {
-        OIC_LOG_V(DEBUG, TAG, "Fail to get jni uuid object");
+        OIC_LOG(DEBUG, TAG, "Fail to get jni uuid object");
         return NULL;
     }
 
@@ -58,7 +58,7 @@ jobject CALEGetUuidFromString(JNIEnv *env, const char* uuid)
 
 jobject CALEGetParcelUuid(JNIEnv *env, jobject uuid)
 {
-    OIC_LOG_V(DEBUG, TAG, "CALEGetParcelUuid");
+    OIC_LOG(DEBUG, TAG, "CALEGetParcelUuid");
 
     jclass jni_cid_ParcelUuid = (*env)->FindClass(env, "android/os/ParcelUuid");
 
@@ -68,7 +68,7 @@ jobject CALEGetParcelUuid(JNIEnv *env, jobject uuid)
     jobject jni_ParcelUuid = (*env)->NewObject(env, jni_cid_ParcelUuid, jni_mid_ParcelUuid, uuid);
     if (!jni_ParcelUuid)
     {
-        OIC_LOG_V(DEBUG, TAG, "Fail to get jni ParcelUuid");
+        OIC_LOG(DEBUG, TAG, "Fail to get jni ParcelUuid");
         return NULL;
     }
 
index cc129b2..2d71c85 100644 (file)
@@ -247,7 +247,7 @@ CAResult_t CAInitializeLE(CARegisterConnectivityCallback registerCallback,
     result = CAInitializeLENetworkMonitor();
     if (CA_STATUS_OK != result)
     {
-        OIC_LOG_V(ERROR, CALEADAPTER_TAG, "CAInitializeLENetworkMonitor() failed");
+        OIC_LOG(ERROR, CALEADAPTER_TAG, "CAInitializeLENetworkMonitor() failed");
         return CA_STATUS_FAILED;
     }
 
@@ -853,7 +853,7 @@ CAResult_t CAInitBleServerSenderQueue()
 
     if (CA_STATUS_OK != CAQueueingThreadStart(g_sendQueueHandle))
     {
-        OIC_LOG_V(ERROR, CALEADAPTER_TAG, "u_thread_pool_add_task failed ");
+        OIC_LOG(ERROR, CALEADAPTER_TAG, "u_thread_pool_add_task failed ");
         OICFree(g_sendQueueHandle);
         g_sendQueueHandle = NULL;
         return CA_STATUS_FAILED;
@@ -892,7 +892,7 @@ CAResult_t CAInitBleClientSenderQueue()
 
     if (CA_STATUS_OK != CAQueueingThreadStart(g_bLEClientSendQueueHandle))
     {
-        OIC_LOG_V(ERROR, CALEADAPTER_TAG, "u_thread_pool_add_task failed ");
+        OIC_LOG(ERROR, CALEADAPTER_TAG, "u_thread_pool_add_task failed ");
         OICFree(g_bLEClientSendQueueHandle);
         g_bLEClientSendQueueHandle = NULL;
         return CA_STATUS_FAILED;
@@ -932,7 +932,7 @@ CAResult_t CAInitBleServerReceiverQueue()
 
     if (CA_STATUS_OK != CAQueueingThreadStart(g_bleServerReceiverQueue))
     {
-        OIC_LOG_V(ERROR, CALEADAPTER_TAG, "u_thread_pool_add_task failed ");
+        OIC_LOG(ERROR, CALEADAPTER_TAG, "u_thread_pool_add_task failed ");
         OICFree(g_bleServerReceiverQueue);
         g_bleServerReceiverQueue = NULL;
         return CA_STATUS_FAILED;
@@ -974,7 +974,7 @@ CAResult_t CAInitBleClientReceiverQueue()
     }
     if (CA_STATUS_OK != CAQueueingThreadStart(g_bleClientReceiverQueue))
     {
-        OIC_LOG_V(ERROR, CALEADAPTER_TAG, "u_thread_pool_add_task failed ");
+        OIC_LOG(ERROR, CALEADAPTER_TAG, "u_thread_pool_add_task failed ");
         OICFree(g_bleClientReceiverQueue);
         g_bleClientReceiverQueue = NULL;
         return CA_STATUS_FAILED;
@@ -1046,7 +1046,7 @@ void CATerminateBleQueues()
 }
 void CABLEServerDataReceiverHandler(void *threadData)
 {
-    OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, CALEADAPTER_TAG, "IN");
 
     static uint32_t recvDataLen = 0;
     static uint32_t totalDataLen = 0;
@@ -1058,7 +1058,7 @@ void CABLEServerDataReceiverHandler(void *threadData)
 
     if (g_dataReceiverHandlerState)
     {
-        OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "checking for DE Fragmentation");
+        OIC_LOG(DEBUG, CALEADAPTER_TAG, "checking for DE Fragmentation");
 
         CALEData_t *bleData = (CALEData_t *) threadData;
         if (!bleData)
@@ -1067,11 +1067,11 @@ void CABLEServerDataReceiverHandler(void *threadData)
             return;
         }
 
-        OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "checking for DE Fragmentation");
+        OIC_LOG(DEBUG, CALEADAPTER_TAG, "checking for DE Fragmentation");
 
         if (!isHeaderAvailable)
         {
-            OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Parsing the header");
+            OIC_LOG(DEBUG, CALEADAPTER_TAG, "Parsing the header");
             totalDataLen = CAParseHeader((char*)bleData->data);
 
             OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Total data to be accumulated [%d] bytes", totalDataLen);
@@ -1112,7 +1112,7 @@ void CABLEServerDataReceiverHandler(void *threadData)
                 u_mutex_unlock(g_bleAdapterReqRespCbMutex);
                 return;
             }
-            OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Sending data up !");
+            OIC_LOG(DEBUG, CALEADAPTER_TAG, "Sending data up !");
             g_networkPacketReceivedCallback(remoteEndpoint, defragData, recvDataLen);
             recvDataLen = 0;
             totalDataLen = 0;
@@ -1124,7 +1124,7 @@ void CABLEServerDataReceiverHandler(void *threadData)
 
         if (false == g_dataReceiverHandlerState)
         {
-            OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "GATTClient is terminating. Cleaning up");
+            OIC_LOG(DEBUG, CALEADAPTER_TAG, "GATTClient is terminating. Cleaning up");
             recvDataLen = 0;
             totalDataLen = 0;
             isHeaderAvailable = false;
@@ -1135,12 +1135,12 @@ void CABLEServerDataReceiverHandler(void *threadData)
         }
     }
     u_mutex_unlock(g_bleClientReceiveDataMutex);
-    OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, CALEADAPTER_TAG, "OUT");
 }
 
 void CABLEClientDataReceiverHandler(void *threadData)
 {
-    OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, CALEADAPTER_TAG, "IN");
 
     static const char *remoteAddress = NULL;
     static const char *serviceUUID = NULL;
@@ -1154,7 +1154,7 @@ void CABLEClientDataReceiverHandler(void *threadData)
 
     if (g_dataReceiverHandlerState)
     {
-        OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "checking for DE Fragmentation");
+        OIC_LOG(DEBUG, CALEADAPTER_TAG, "checking for DE Fragmentation");
 
         CALEData_t *bleData = (CALEData_t *) threadData;
         if (!bleData)
@@ -1163,11 +1163,11 @@ void CABLEClientDataReceiverHandler(void *threadData)
             return;
         }
 
-        OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "checking for DE Fragmentation");
+        OIC_LOG(DEBUG, CALEADAPTER_TAG, "checking for DE Fragmentation");
 
         if (!isHeaderAvailable)
         {
-            OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Parsing the header");
+            OIC_LOG(DEBUG, CALEADAPTER_TAG, "Parsing the header");
 
             totalDataLen = CAParseHeader(bleData->data);
             OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Total data to be accumulated [%d] bytes",
@@ -1210,7 +1210,7 @@ void CABLEClientDataReceiverHandler(void *threadData)
                 u_mutex_unlock(g_bleAdapterReqRespCbMutex);
                 return;
             }
-            OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Sending data up !");
+            OIC_LOG(DEBUG, CALEADAPTER_TAG, "Sending data up !");
             g_networkPacketReceivedCallback(remoteEndpoint, defragData, recvDataLen);
             recvDataLen = 0;
             totalDataLen = 0;
@@ -1222,7 +1222,7 @@ void CABLEClientDataReceiverHandler(void *threadData)
 
         if (false == g_dataReceiverHandlerState)
         {
-            OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "GATTClient is terminating. Cleaning up");
+            OIC_LOG(DEBUG, CALEADAPTER_TAG, "GATTClient is terminating. Cleaning up");
             OICFree(defragData);
             CAAdapterFreeRemoteEndpoint(remoteEndpoint);
             u_mutex_unlock(g_bleClientReceiveDataMutex);
@@ -1230,7 +1230,7 @@ void CABLEClientDataReceiverHandler(void *threadData)
         }
     }
     u_mutex_unlock(g_bleClientReceiveDataMutex);
-    OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, CALEADAPTER_TAG, "OUT");
 }
 
 void CABLEServerSendDataThread(void *threadData)
@@ -1546,7 +1546,7 @@ CAResult_t CABLEClientSendData(const CARemoteEndpoint_t *remoteEndpoint,
     CALEData_t *bleData = CACreateBLEData(remoteEndpoint, data, dataLen);
     if (!bleData)
     {
-        OIC_LOG_V(ERROR, CALEADAPTER_TAG, "Failed to create bledata!");
+        OIC_LOG(ERROR, CALEADAPTER_TAG, "Failed to create bledata!");
         return CA_MEMORY_ALLOC_FAILED;
     }
     // Add message to send queue
@@ -1582,7 +1582,7 @@ CAResult_t CABLEServerSendData(const CARemoteEndpoint_t *remoteEndpoint,
     CALEData_t *bleData = CACreateBLEData(remoteEndpoint, data, dataLen);
     if (!bleData)
     {
-        OIC_LOG_V(ERROR, CALEADAPTER_TAG, "Failed to create bledata!");
+        OIC_LOG(ERROR, CALEADAPTER_TAG, "Failed to create bledata!");
         return CA_MEMORY_ALLOC_FAILED;
     }
     // Add message to send queue
@@ -1597,7 +1597,7 @@ CAResult_t CABLEServerSendData(const CARemoteEndpoint_t *remoteEndpoint,
 CAResult_t CABLEServerReceivedData(const char *remoteAddress, const char *serviceUUID,
                                    const void *data, uint32_t dataLength, uint32_t *sentLength)
 {
-    OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, CALEADAPTER_TAG, "IN");
 
     //Input validation
     VERIFY_NON_NULL(serviceUUID, CALEADAPTER_TAG, "service UUID is null");
@@ -1611,7 +1611,7 @@ CAResult_t CABLEServerReceivedData(const char *remoteAddress, const char *servic
                                          serviceUUID);
     if (NULL == remoteEndpoint)
     {
-        OIC_LOG_V(ERROR, CALEADAPTER_TAG, "Failed to create remote endpoint !");
+        OIC_LOG(ERROR, CALEADAPTER_TAG, "Failed to create remote endpoint !");
         return CA_STATUS_FAILED;
     }
 
@@ -1621,7 +1621,7 @@ CAResult_t CABLEServerReceivedData(const char *remoteAddress, const char *servic
     CALEData_t *bleData = CACreateBLEData(remoteEndpoint, data, dataLength);
     if (!bleData)
     {
-        OIC_LOG_V(ERROR, CALEADAPTER_TAG, "Failed to create bledata!");
+        OIC_LOG(ERROR, CALEADAPTER_TAG, "Failed to create bledata!");
         CAAdapterFreeRemoteEndpoint(remoteEndpoint);
         return CA_MEMORY_ALLOC_FAILED;
     }
@@ -1632,14 +1632,14 @@ CAResult_t CABLEServerReceivedData(const char *remoteAddress, const char *servic
 
     *sentLength = dataLength;
 
-    OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, CALEADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CABLEClientReceivedData(const char *remoteAddress, const char *serviceUUID,
                                    const void *data, uint32_t dataLength, uint32_t *sentLength)
 {
-    OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "IN");
+    OIC_LOG(DEBUG, CALEADAPTER_TAG, "IN");
 
     //Input validation
     VERIFY_NON_NULL(serviceUUID, CALEADAPTER_TAG, "service UUID is null");
@@ -1653,7 +1653,7 @@ CAResult_t CABLEClientReceivedData(const char *remoteAddress, const char *servic
                                          serviceUUID);
     if (NULL == remoteEndpoint)
     {
-        OIC_LOG_V(ERROR, CALEADAPTER_TAG, "Failed to create remote endpoint !");
+        OIC_LOG(ERROR, CALEADAPTER_TAG, "Failed to create remote endpoint !");
         return CA_STATUS_FAILED;
     }
 
@@ -1663,7 +1663,7 @@ CAResult_t CABLEClientReceivedData(const char *remoteAddress, const char *servic
     CALEData_t *bleData = CACreateBLEData(remoteEndpoint, data, dataLength);
     if (!bleData)
     {
-        OIC_LOG_V(ERROR, CALEADAPTER_TAG, "Failed to create bledata!");
+        OIC_LOG(ERROR, CALEADAPTER_TAG, "Failed to create bledata!");
         CAAdapterFreeRemoteEndpoint(remoteEndpoint);
         return CA_MEMORY_ALLOC_FAILED;
     }
@@ -1674,7 +1674,7 @@ CAResult_t CABLEClientReceivedData(const char *remoteAddress, const char *servic
 
     *sentLength = dataLength;
 
-    OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "OUT");
+    OIC_LOG(DEBUG, CALEADAPTER_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
index 80d4f17..f0fede2 100644 (file)
@@ -34,7 +34,7 @@ CAResult_t CAInitializeLE(CARegisterConnectivityCallback registerCallback,
                           CANetworkPacketReceivedCallback reqRespCallback, CANetworkChangeCallback netCallback,
                           u_thread_pool_t handle)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAInitializeLE");
+    OIC_LOG(DEBUG, TAG, "CAInitializeLE");
 
     g_leReceivedCallback = reqRespCallback;
     g_threadPoolHandle = handle;
@@ -60,62 +60,62 @@ CAResult_t CAInitializeLE(CARegisterConnectivityCallback registerCallback,
 
 CAResult_t CAStartLE()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAStartLE");
+    OIC_LOG(DEBUG, TAG, "CAStartLE");
 
     return CA_STATUS_OK;
 }
 
 CAResult_t CAStartLEListeningServer()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAStartLEListeningServer");
+    OIC_LOG(DEBUG, TAG, "CAStartLEListeningServer");
 
     return CA_STATUS_OK;
 }
 
 CAResult_t CAStartLEDiscoveryServer()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAStartLEDiscoveryServer");
+    OIC_LOG(DEBUG, TAG, "CAStartLEDiscoveryServer");
 
     return CA_STATUS_OK;
 }
 
 int32_t CASendLEUnicastData(const CARemoteEndpoint_t *endpoint, const void *data, uint32_t dataLen)
 {
-    OIC_LOG_V(DEBUG, TAG, "CASendLEUnicastData");
+    OIC_LOG(DEBUG, TAG, "CASendLEUnicastData");
 
     return -1;
 }
 
 int32_t CASendLEMulticastData(const void *data, uint32_t dataLen)
 {
-    OIC_LOG_V(DEBUG, TAG, "CASendLEMulticastData");
+    OIC_LOG(DEBUG, TAG, "CASendLEMulticastData");
 
     return -1;
 }
 
 CAResult_t CAGetLEInterfaceInformation(CALocalConnectivity_t **info, uint32_t *size)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAGetLEInterfaceInformation");
+    OIC_LOG(DEBUG, TAG, "CAGetLEInterfaceInformation");
 
     return CA_STATUS_OK;
 }
 
 CAResult_t CAReadLEData()
 {
-    OIC_LOG_V(DEBUG, TAG, "Read LE Data");
+    OIC_LOG(DEBUG, TAG, "Read LE Data");
 
     return CA_STATUS_OK;
 }
 
 CAResult_t CAStopLE()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAStopLE");
+    OIC_LOG(DEBUG, TAG, "CAStopLE");
 
     return CA_STATUS_OK;
 }
 
 void CATerminateLE()
 {
-    OIC_LOG_V(DEBUG, TAG, "TerminatLE");
+    OIC_LOG(DEBUG, TAG, "TerminatLE");
 }
 
index a8320a7..0cad480 100644 (file)
@@ -170,7 +170,7 @@ void CABleGattCharacteristicChangedCb(bt_gatt_attribute_h characteristic,
         OICFree(data);
         return;
     }
-    OIC_LOG_V(DEBUG, TZ_BLE_CLIENT_TAG, "Sending data up !");
+    OIC_LOG(DEBUG, TZ_BLE_CLIENT_TAG, "Sending data up !");
 
     u_mutex_lock(g_bleServerBDAddressMutex);
     uint32_t sentLength = 0;
@@ -239,7 +239,7 @@ void CABleGattDescriptorDiscoveredCb(int result, unsigned char format, int total
                                             stTemp);
     if (CA_STATUS_OK != ret)
     {
-        OIC_LOG_V(ERROR, TZ_BLE_CLIENT_TAG, "u_thread_pool_add_task failed");
+        OIC_LOG(ERROR, TZ_BLE_CLIENT_TAG, "u_thread_pool_add_task failed");
         bt_gatt_destroy_attribute_handle(stTemp->characteristic);
         OICFree(stTemp->desc);
         OICFree(stTemp);
@@ -288,7 +288,7 @@ bool CABleGattCharacteristicsDiscoveredCb(int result,
         CAResult_t retVal = CAAppendBLECharInfo(characteristic, BLE_GATT_READ_CHAR, bleServiceInfo);
         if (CA_STATUS_OK != retVal)
         {
-            OIC_LOG_V(ERROR, TZ_BLE_CLIENT_TAG , "CAAppendBLECharInfo failed ");
+            OIC_LOG(ERROR, TZ_BLE_CLIENT_TAG , "CAAppendBLECharInfo failed ");
             return false;
         }
         char *uuid = NULL;
@@ -305,7 +305,7 @@ bool CABleGattCharacteristicsDiscoveredCb(int result,
         CAResult_t retVal = CAAppendBLECharInfo(characteristic, BLE_GATT_WRITE_CHAR, bleServiceInfo);
         if (CA_STATUS_OK != retVal)
         {
-            OIC_LOG_V(ERROR, TZ_BLE_CLIENT_TAG , "CAAppendBLECharInfo failed! ");
+            OIC_LOG(ERROR, TZ_BLE_CLIENT_TAG , "CAAppendBLECharInfo failed! ");
             return false;
         }
         char *uuid = NULL;
@@ -470,7 +470,7 @@ bool CABleGattPrimaryServiceCb(bt_gatt_attribute_h service, int index, int count
     {
         OIC_LOG(DEBUG, TZ_BLE_CLIENT_TAG, "Its OIC service");
 
-        OIC_LOG_V(DEBUG, TZ_BLE_CLIENT_TAG , "Registering to watch characteristics changes  \n");
+        OIC_LOG(DEBUG, TZ_BLE_CLIENT_TAG , "Registering to watch characteristics changes  \n");
 
         result = CABleGattWatchCharacteristicChanges(service);
         if (CA_STATUS_OK != result)
@@ -525,7 +525,7 @@ bool CABleGattPrimaryServiceCb(bt_gatt_attribute_h service, int index, int count
         u_mutex_unlock(g_bleServiceListMutex);
         if (CA_STATUS_OK != result)
         {
-            OIC_LOG_V(ERROR, TZ_BLE_CLIENT_TAG , "CAAddBLEServiceInfoToList failed!");
+            OIC_LOG(ERROR, TZ_BLE_CLIENT_TAG , "CAAddBLEServiceInfoToList failed!");
             OICFree(stTemp->address);
             OICFree(stTemp);
             CAFreeBLEServiceInfo(bleServiceInfo);
@@ -588,7 +588,7 @@ void CABleGattConnectionStateChangedCb(int result, bool connected,
         ret = CABleGattStartDeviceDiscovery();
         if (CA_STATUS_OK != ret)
         {
-            OIC_LOG_V(ERROR, TZ_BLE_CLIENT_TAG, "CABleGattStartDeviceDiscovery failed");
+            OIC_LOG(ERROR, TZ_BLE_CLIENT_TAG, "CABleGattStartDeviceDiscovery failed");
             return;
         }
     }
@@ -796,7 +796,7 @@ CAResult_t CAStartBLEGattClient()
                                      NULL);
     if (CA_STATUS_OK != retVal)
     {
-        OIC_LOG_V(ERROR, TZ_BLE_CLIENT_TAG, "u_thread_pool_add_task failed");
+        OIC_LOG(ERROR, TZ_BLE_CLIENT_TAG, "u_thread_pool_add_task failed");
         CATerminateGattClientMutexVariables();
         u_mutex_unlock(g_bleClientThreadPoolMutex);
         return CA_STATUS_FAILED;
@@ -1323,7 +1323,7 @@ void CADiscoverCharThread(void *stServiceInfo)
     CAResult_t  result = CABleGattDiscoverCharacteristics(stTemp->serviceInfo, stTemp->address);
     if (CA_STATUS_OK != result)
     {
-        OIC_LOG_V(ERROR, TZ_BLE_CLIENT_TAG , "CABleGattDiscoverCharacteristics failed!");
+        OIC_LOG(ERROR, TZ_BLE_CLIENT_TAG , "CABleGattDiscoverCharacteristics failed!");
         bt_gatt_destroy_attribute_handle(stTemp->serviceInfo);
         OICFree(stTemp->address);
         OICFree(stTemp);
@@ -1339,7 +1339,7 @@ void CADiscoverCharThread(void *stServiceInfo)
 CAResult_t CABleGattDiscoverCharacteristics(bt_gatt_attribute_h service,
         const char *remoteAddress)
 {
-    OIC_LOG_V(DEBUG, TZ_BLE_CLIENT_TAG, "IN");
+    OIC_LOG(DEBUG, TZ_BLE_CLIENT_TAG, "IN");
 
     VERIFY_NON_NULL_RET(service, NULL, "service is NULL", CA_STATUS_FAILED);
 
@@ -1393,7 +1393,7 @@ void CADiscoverDescriptorThread(void *stServiceInfo)
 
 CAResult_t CABleGattDiscoverDescriptor(bt_gatt_attribute_h service, const char *remoteAddress)
 {
-    OIC_LOG_V(DEBUG, TZ_BLE_CLIENT_TAG, "IN");
+    OIC_LOG(DEBUG, TZ_BLE_CLIENT_TAG, "IN");
 
     VERIFY_NON_NULL_RET(service, NULL, "service is NULL", CA_STATUS_FAILED);
 
@@ -1422,7 +1422,7 @@ void CASetCharacteristicDescriptorValueThread(void *stServiceInfo)
     CAResult_t  result = CASetCharacteristicDescriptorValue(stTemp);
     if (CA_STATUS_OK != result)
     {
-        OIC_LOG_V(ERROR, TZ_BLE_CLIENT_TAG , "CASetCharacteristicDescriptorValue failed!");
+        OIC_LOG(ERROR, TZ_BLE_CLIENT_TAG , "CASetCharacteristicDescriptorValue failed!");
         bt_gatt_destroy_attribute_handle(stTemp->characteristic);
         OICFree(stTemp->desc);
         OICFree(stTemp);
@@ -1544,7 +1544,7 @@ CAResult_t  CAUpdateCharacteristicsToGattServer(const char *remoteAddress,
 
     if (0 >= dataLen)
     {
-        OIC_LOG_V(ERROR, TZ_BLE_CLIENT_TAG, "dataLen is less than or equal zero. Invalid input!");
+        OIC_LOG(ERROR, TZ_BLE_CLIENT_TAG, "dataLen is less than or equal zero. Invalid input!");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -1567,7 +1567,7 @@ CAResult_t  CAUpdateCharacteristicsToGattServer(const char *remoteAddress,
 
     if (CA_STATUS_OK != ret)
     {
-        OIC_LOG_V(ERROR, TZ_BLE_CLIENT_TAG, "CAGetBLEServiceInfoByPosition is failed");
+        OIC_LOG(ERROR, TZ_BLE_CLIENT_TAG, "CAGetBLEServiceInfoByPosition is failed");
         return CA_STATUS_FAILED;
     }
 
@@ -1614,7 +1614,7 @@ CAResult_t  CAUpdateCharacteristicsToAllGattServers(const char  *data,
 
     if (0 >= dataLen)
     {
-        OIC_LOG_V(ERROR, TZ_BLE_CLIENT_TAG, "dataLen is less than or equal zero. Invalid input !");
+        OIC_LOG(ERROR, TZ_BLE_CLIENT_TAG, "dataLen is less than or equal zero. Invalid input !");
         return CA_STATUS_INVALID_PARAM;
     }
 
index af4c86e..76155ed 100644 (file)
@@ -76,7 +76,7 @@ CAResult_t CAInitializeLENetworkMonitor()
     CAResult_t res = CAInitLENetworkMonitorMutexVariables();
     if (CA_STATUS_OK != res)
     {
-        OIC_LOG_V(ERROR, TZ_LE_NWK_MONITOR_TAG, "CAInitLENetworkMonitorMutexVariables() failed");
+        OIC_LOG(ERROR, TZ_LE_NWK_MONITOR_TAG, "CAInitLENetworkMonitorMutexVariables() failed");
         return CA_STATUS_FAILED;
     }
     OIC_LOG(DEBUG, TZ_LE_NWK_MONITOR_TAG, "OUT");
@@ -110,14 +110,14 @@ CAResult_t CAInitializeLEAdapter()
     int ret = bt_initialize();
     if (0 != ret)
     {
-        OIC_LOG_V(ERROR, TZ_LE_NWK_MONITOR_TAG, "bt_initialize failed");
+        OIC_LOG(ERROR, TZ_LE_NWK_MONITOR_TAG, "bt_initialize failed");
         return CA_STATUS_FAILED;
     }
 
     ret = bt_adapter_set_visibility(BT_ADAPTER_VISIBILITY_MODE_GENERAL_DISCOVERABLE, 0);
     if (0 != ret)
     {
-        OIC_LOG_V(ERROR, TZ_LE_NWK_MONITOR_TAG, "bt_adapter_set_visibility failed");
+        OIC_LOG(ERROR, TZ_LE_NWK_MONITOR_TAG, "bt_adapter_set_visibility failed");
         return CA_STATUS_FAILED;
     }
 
index 0c701ca..277797b 100644 (file)
@@ -653,7 +653,7 @@ void CABleGattRemoteCharacteristicWriteCb(char *charPath,
         return;
     }
 
-    OIC_LOG_V(DEBUG, TZ_BLE_SERVER_TAG, "Sending data up !");
+    OIC_LOG(DEBUG, TZ_BLE_SERVER_TAG, "Sending data up !");
     u_mutex_lock(g_bleClientBDAddressMutex);
     uint32_t sentLength = 0;
     g_bleServerDataReceivedCallback(g_remoteClientAddress, OIC_BLE_SERVICE_ID,
index 29e5b77..ccbdac7 100644 (file)
@@ -40,14 +40,14 @@ extern void CADTLSSetCredentialsCallback(CAGetDTLSCredentialsHandler credCallbac
 
 CAResult_t CAInitialize()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAInitialize");
+    OIC_LOG(DEBUG, TAG, "CAInitialize");
 
     return CAInitializeMessageHandler();;
 }
 
 void CATerminate()
 {
-    OIC_LOG_V(DEBUG, TAG, "CATerminate");
+    OIC_LOG(DEBUG, TAG, "CATerminate");
 
     CATerminateMessageHandler();
 
@@ -56,21 +56,21 @@ void CATerminate()
 
 CAResult_t CAStartListeningServer()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAStartListeningServer");
+    OIC_LOG(DEBUG, TAG, "CAStartListeningServer");
 
     return CAStartListeningServerAdapters();
 }
 
 CAResult_t CAStartDiscoveryServer()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAStartDiscoveryServer");
+    OIC_LOG(DEBUG, TAG, "CAStartDiscoveryServer");
 
     return CAStartDiscoveryServerAdapters();
 }
 
 void CARegisterHandler(CARequestCallback ReqHandler, CAResponseCallback RespHandler)
 {
-    OIC_LOG_V(DEBUG, TAG, "CARegisterHandler");
+    OIC_LOG(DEBUG, TAG, "CARegisterHandler");
 
     CASetRequestResponseCallbacks(ReqHandler, RespHandler);
 }
@@ -88,13 +88,13 @@ CAResult_t CARegisterDTLSCredentialsHandler(
 CAResult_t CACreateRemoteEndpoint(const CAURI_t uri,
     const CAConnectivityType_t connectivityType,CARemoteEndpoint_t **remoteEndpoint)
 {
-    OIC_LOG_V(DEBUG, TAG, "CACreateRemoteEndpoint");
+    OIC_LOG(DEBUG, TAG, "CACreateRemoteEndpoint");
 
     CARemoteEndpoint_t *remote = CACreateRemoteEndpointUriInternal(uri, connectivityType);
 
     if (remote == NULL)
     {
-        OIC_LOG_V(DEBUG, TAG, "remote is NULL!");
+        OIC_LOG(DEBUG, TAG, "remote is NULL!");
         return CA_STATUS_FAILED;
     }
 
@@ -105,35 +105,35 @@ CAResult_t CACreateRemoteEndpoint(const CAURI_t uri,
 
 void CADestroyRemoteEndpoint(CARemoteEndpoint_t *rep)
 {
-    OIC_LOG_V(DEBUG, TAG, "CADestroyRemoteEndpoint");
+    OIC_LOG(DEBUG, TAG, "CADestroyRemoteEndpoint");
 
     CADestroyRemoteEndpointInternal(rep);
 }
 
 CAResult_t CAGenerateToken(CAToken_t *token, uint8_t tokenLength)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAGenerateToken");
+    OIC_LOG(DEBUG, TAG, "CAGenerateToken");
 
     return CAGenerateTokenInternal(token, tokenLength);
 }
 
 void CADestroyToken(CAToken_t token)
 {
-    OIC_LOG_V(DEBUG, TAG, "CADestroyToken");
+    OIC_LOG(DEBUG, TAG, "CADestroyToken");
 
     CADestroyTokenInternal(token);
 }
 
 CAResult_t CAGetNetworkInformation(CALocalConnectivity_t **info, uint32_t *size)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAGetNetworkInformation");
+    OIC_LOG(DEBUG, TAG, "CAGetNetworkInformation");
 
     return CAGetNetworkInformationInternal(info, size);
 }
 
 CAResult_t CAFindResource(const CAURI_t resourceUri, const CAToken_t token, uint8_t tokenLength)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAFindResource");
+    OIC_LOG(DEBUG, TAG, "CAFindResource");
 
     return CADetachMessageResourceUri(resourceUri, token, tokenLength, NULL, 0);
 
@@ -141,7 +141,7 @@ CAResult_t CAFindResource(const CAURI_t resourceUri, const CAToken_t token, uint
 
 CAResult_t CASendRequest(const CARemoteEndpoint_t *object,const CARequestInfo_t *requestInfo)
 {
-    OIC_LOG_V(DEBUG, TAG, "CASendGetRequest");
+    OIC_LOG(DEBUG, TAG, "CASendGetRequest");
 
     return CADetachRequestMessage(object, requestInfo);
 }
@@ -149,7 +149,7 @@ CAResult_t CASendRequest(const CARemoteEndpoint_t *object,const CARequestInfo_t
 CAResult_t CASendRequestToAll(const CAGroupEndpoint_t *object,
                               const CARequestInfo_t *requestInfo)
 {
-    OIC_LOG_V(DEBUG, TAG, "CASendRequestToAll");
+    OIC_LOG(DEBUG, TAG, "CASendRequestToAll");
 
     return CADetachRequestToAllMessage(object, requestInfo);
 }
@@ -157,7 +157,7 @@ CAResult_t CASendRequestToAll(const CAGroupEndpoint_t *object,
 CAResult_t CASendNotification(const CARemoteEndpoint_t *object,
     const CAResponseInfo_t *responseInfo)
 {
-    OIC_LOG_V(DEBUG, TAG, "CASendNotification");
+    OIC_LOG(DEBUG, TAG, "CASendNotification");
 
     return CADetachResponseMessage(object, responseInfo);
 
@@ -166,7 +166,7 @@ CAResult_t CASendNotification(const CARemoteEndpoint_t *object,
 CAResult_t CASendResponse(const CARemoteEndpoint_t *object,
     const CAResponseInfo_t *responseInfo)
 {
-    OIC_LOG_V(DEBUG, TAG, "CASendResponse");
+    OIC_LOG(DEBUG, TAG, "CASendResponse");
 
     return CADetachResponseMessage(object, responseInfo);
 
@@ -176,7 +176,7 @@ CAResult_t CAAdvertiseResource(const CAURI_t resourceUri,const CAToken_t token,
                                uint8_t tokenLength, const CAHeaderOption_t *options,
                                const uint8_t numOptions)
 {
-    OIC_LOG_V(DEBUG, TAG, "CAAdvertiseResource");
+    OIC_LOG(DEBUG, TAG, "CAAdvertiseResource");
 
     return CADetachMessageResourceUri(resourceUri, token, tokenLength, options, numOptions);
 
@@ -258,7 +258,7 @@ CAResult_t CAUnSelectNetwork(const uint32_t nonInterestedNetwork)
 
 CAResult_t CAHandleRequestResponse()
 {
-    OIC_LOG_V(DEBUG, TAG, "CAHandleRequestResponse");
+    OIC_LOG(DEBUG, TAG, "CAHandleRequestResponse");
 
     CAHandleRequestResponseCallbacks();
 
index f92f984..c06d542 100644 (file)
@@ -37,7 +37,7 @@
 #define TAG PCF("CA")
 
 #define CA_MEMORY_ALLOC_CHECK(arg) {if (arg == NULL) \
-    {OIC_LOG_V(ERROR, TAG, "memory error");goto memory_error_exit;} }
+    {OIC_LOG(ERROR, TAG, "memory error");goto memory_error_exit;} }
 
 #define CA_CONNECTIVITY_TYPE_NUM   4
 
@@ -292,7 +292,7 @@ CAResult_t CAGetNetworkInfo(CALocalConnectivity_t **info, uint32_t *size)
 
     res = CA_STATUS_OK;
 
-    OIC_LOG_V(DEBUG, TAG, "each network info save success!");
+    OIC_LOG(DEBUG, TAG, "each network info save success!");
 
     return res;
 
@@ -317,7 +317,7 @@ CAResult_t CASendUnicastData(const CARemoteEndpoint_t *endpoint, const void *dat
 
     if (endpoint == NULL)
     {
-        OIC_LOG_V(DEBUG, TAG, "Invalid endpoint");
+        OIC_LOG(DEBUG, TAG, "Invalid endpoint");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -385,7 +385,7 @@ CAResult_t CASendMulticastData(const void *data, uint32_t length)
             void *payload = (void *) OICMalloc(length);
             if (!payload)
             {
-                OIC_LOG_V(ERROR, TAG, "Out of memory!");
+                OIC_LOG(ERROR, TAG, "Out of memory!");
                 return CA_MEMORY_ALLOC_FAILED;
             }
             memcpy(payload, data, length);
@@ -399,7 +399,7 @@ CAResult_t CASendMulticastData(const void *data, uint32_t length)
         }
         else
         {
-            OIC_LOG_V(ERROR, TAG, "sendDataToAll failed!");
+            OIC_LOG(ERROR, TAG, "sendDataToAll failed!");
         }
     }
 
@@ -473,7 +473,7 @@ CAResult_t CAStartDiscoveryServerAdapters()
 
         if (index == -1)
         {
-            OIC_LOG_V(DEBUG, TAG, "unknown connectivity type!");
+            OIC_LOG(DEBUG, TAG, "unknown connectivity type!");
             continue;
         }
 
index a80812a..ce9ed44 100644 (file)
@@ -356,7 +356,7 @@ CAResult_t CARetransmissionSentData(CARetransmission_t *context,
     if (NULL == pduData)
     {
         OICFree(retData);
-        OIC_LOG_V(ERROR, TAG, "memory error!!");
+        OIC_LOG(ERROR, TAG, "memory error!!");
         return CA_MEMORY_ALLOC_FAILED;
     }
     memcpy(pduData, pdu, size);
@@ -427,7 +427,7 @@ CAResult_t CARetransmissionReceivedData(CARetransmission_t *context,
                                         const CARemoteEndpoint_t *endpoint, const void *pdu,
                                         uint32_t size, void **retransmissionPdu)
 {
-    OIC_LOG_V(DEBUG, TAG, "IN - CARetransmissionReceivedData");
+    OIC_LOG(DEBUG, TAG, "IN - CARetransmissionReceivedData");
     if (NULL == context || NULL == endpoint || NULL == pdu || NULL == retransmissionPdu)
     {
         OIC_LOG(ERROR, TAG, "invalid parameter..");
index ec600dc..f03d03f 100644 (file)
@@ -199,7 +199,7 @@ void CAEthernetNotifyNetworkChange(const char *address, const uint16_t port,
     CALocalConnectivity_t *localEndpoint = CAAdapterCreateLocalEndpoint(CA_ETHERNET, address);
     if (!localEndpoint)
     {
-        OIC_LOG_V(ERROR, ETHERNET_ADAPTER_TAG, "Out of memory");
+        OIC_LOG(ERROR, ETHERNET_ADAPTER_TAG, "Out of memory");
         return;
     }
 
@@ -547,7 +547,7 @@ int32_t CASendEthernetUnicastData(const CARemoteEndpoint_t *remoteEndpoint, cons
 
     if (0 == dataLength)
     {
-        OIC_LOG_V(ERROR, ETHERNET_ADAPTER_TAG, "Invalid Data Length");
+        OIC_LOG(ERROR, ETHERNET_ADAPTER_TAG, "Invalid Data Length");
         return -1;
     }
 
@@ -555,7 +555,7 @@ int32_t CASendEthernetUnicastData(const CARemoteEndpoint_t *remoteEndpoint, cons
     CAEthernetData *ethernetData = CACreateEthernetData(remoteEndpoint, data, dataLength);
     if (!ethernetData)
     {
-        OIC_LOG_V(ERROR, ETHERNET_ADAPTER_TAG, "Failed to create ethernetData!");
+        OIC_LOG(ERROR, ETHERNET_ADAPTER_TAG, "Failed to create ethernetData!");
         return -1;
     }
     else
@@ -577,7 +577,7 @@ int32_t CASendEthernetMulticastData(const void *data, uint32_t dataLength)
 
     if (0 == dataLength)
     {
-        OIC_LOG_V(ERROR, ETHERNET_ADAPTER_TAG, "Invalid Data Length");
+        OIC_LOG(ERROR, ETHERNET_ADAPTER_TAG, "Invalid Data Length");
         return -1;
     }
 
@@ -585,7 +585,7 @@ int32_t CASendEthernetMulticastData(const void *data, uint32_t dataLength)
     CAEthernetData *EthernetData = CACreateEthernetData(NULL, data, dataLength);
     if (!EthernetData)
     {
-        OIC_LOG_V(ERROR, ETHERNET_ADAPTER_TAG, "Failed to create ethernetData!");
+        OIC_LOG(ERROR, ETHERNET_ADAPTER_TAG, "Failed to create ethernetData!");
         return -1;
     }
     else
index ca6d556..fe4d50b 100644 (file)
@@ -119,7 +119,7 @@ static void CANetworkMonitorThread(void *threadData);
 
 CAResult_t CAEthernetInitializeNetworkMonitor(const u_thread_pool_t threadPool)
 {
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "IN");
 
     g_threadPool = threadPool;
 
@@ -135,13 +135,13 @@ CAResult_t CAEthernetInitializeNetworkMonitor(const u_thread_pool_t threadPool)
 
     nwConnectivityStatus = (g_ethernetIPAddress) ? CA_INTERFACE_UP : CA_INTERFACE_DOWN;
 
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 void CAEthernetTerminateNetworkMonitor(void)
 {
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "IN");
 
     g_threadPool = NULL;
 
@@ -169,18 +169,18 @@ void CAEthernetTerminateNetworkMonitor(void)
         g_ethernetNetInfoMutex = NULL;
     }
 
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
 }
 
 CAResult_t CAEthernetStartNetworkMonitor(void)
 {
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "IN");
 
     g_stopNetworkMonitor = false;
 
     if (g_stopNetworkMonitor)
     {
-        OIC_LOG_V(ERROR, ETHERNET_MONITOR_TAG, "Stop network monitor requested");
+        OIC_LOG(ERROR, ETHERNET_MONITOR_TAG, "Stop network monitor requested");
         return CA_STATUS_FAILED;
     }
 
@@ -197,7 +197,7 @@ CAResult_t CAEthernetStartNetworkMonitor(void)
 
 CAResult_t CAEthernetStopNetworkMonitor(void)
 {
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "IN");
 
     if (g_stopNetworkMonitor)
     {
@@ -207,13 +207,13 @@ CAResult_t CAEthernetStopNetworkMonitor(void)
 
     g_stopNetworkMonitor = true;
 
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAEthernetGetInterfaceInfo(char **interfaceName, char **ipAddress)
 {
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "IN");
 
     VERIFY_NON_NULL(interfaceName, ETHERNET_MONITOR_TAG, "interface name");
     VERIFY_NON_NULL(ipAddress, ETHERNET_MONITOR_TAG, "ip address");
@@ -222,7 +222,7 @@ CAResult_t CAEthernetGetInterfaceInfo(char **interfaceName, char **ipAddress)
     u_mutex_lock(g_ethernetNetInfoMutex);
     if (g_ethernetInterfaceName == NULL || g_ethernetIPAddress == NULL)
     {
-        OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "Network not enabled");
+        OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "Network not enabled");
 
         u_mutex_unlock(g_ethernetNetInfoMutex);
         return CA_ADAPTER_NOT_ENABLED;
@@ -235,20 +235,20 @@ CAResult_t CAEthernetGetInterfaceInfo(char **interfaceName, char **ipAddress)
 
     u_mutex_unlock(g_ethernetNetInfoMutex);
 
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAEthernetGetInterfaceSubnetMask(char **subnetMask)
 {
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "IN");
 
     VERIFY_NON_NULL(subnetMask, ETHERNET_MONITOR_TAG, "subnet mask");
 
     u_mutex_lock(g_ethernetNetInfoMutex);
     if (NULL == g_ethernetSubnetMask)
     {
-        OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "There is no subnet mask information!");
+        OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "There is no subnet mask information!");
 
         u_mutex_unlock(g_ethernetNetInfoMutex);
         return CA_STATUS_FAILED;
@@ -259,21 +259,21 @@ CAResult_t CAEthernetGetInterfaceSubnetMask(char **subnetMask)
                   : NULL;
     u_mutex_unlock(g_ethernetNetInfoMutex);
 
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 bool CAEthernetIsConnected(void)
 {
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "IN");
 
     if (CA_INTERFACE_DOWN == nwConnectivityStatus) {
-        OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
+        OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
 
         return false;
     }
 
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
 
     return true;
 }
@@ -281,10 +281,10 @@ bool CAEthernetIsConnected(void)
 void CAEthernetSetConnectionStateChangeCallback
     (CAEthernetConnectionStateChangeCallback callback)
 {
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "IN");
     g_networkChangeCb = callback;
 
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
 }
 
 void CAEthernetGetInterfaceInformation(char **interfaceName,
@@ -367,7 +367,7 @@ void CAEthernetGetInterfaceInformation(char **interfaceName,
 
 void CANetworkMonitorThread(void *threadData)
 {
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "IN");
 
     while (!g_stopNetworkMonitor)
     {
@@ -409,6 +409,6 @@ void CANetworkMonitorThread(void *threadData)
         OICFree(subnetMask);
     }
 
-    OIC_LOG_V(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, ETHERNET_MONITOR_TAG, "OUT");
 }
 
index 699334e..846ba2d 100644 (file)
@@ -315,7 +315,7 @@ static void CAReceiveHandler(void *data)
         char *netMask = NULL;
         if (CA_STATUS_OK != CAEthernetGetInterfaceSubnetMask(&netMask))
         {
-            OIC_LOG_V(ERROR, ETHERNET_SERVER_TAG, "Failed to get ethernet subnet");
+            OIC_LOG(ERROR, ETHERNET_SERVER_TAG, "Failed to get ethernet subnet");
             continue;
         }
 
@@ -355,7 +355,7 @@ static void CAReceiveHandler(void *data)
 #endif //__WITH_DTLS__
             default:
                 // Should never occur
-                OIC_LOG_V(DEBUG, ETHERNET_SERVER_TAG, "Invalid server type");
+                OIC_LOG(DEBUG, ETHERNET_SERVER_TAG, "Invalid server type");
                 if (ctx->stopFd != -1)
                 {
                     close(ctx->stopFd);
@@ -673,7 +673,7 @@ CAResult_t CAEthernetStartUnicastServer(const char *localAddress, uint16_t *port
 
     if (0 >= *port)
     {
-        OIC_LOG_V(ERROR, ETHERNET_SERVER_TAG, "Invalid input: port is invalid!");
+        OIC_LOG(ERROR, ETHERNET_SERVER_TAG, "Invalid input: port is invalid!");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -695,7 +695,7 @@ CAResult_t CAEthernetStartUnicastServer(const char *localAddress, uint16_t *port
         if (CA_STATUS_OK != CAStartUnicastServer(localAddress, port, forceStart, isSecured,
                 &g_unicastServerSocketFD))
         {
-            OIC_LOG_V(ERROR, ETHERNET_SERVER_TAG, "Failed to start unicast server!");
+            OIC_LOG(ERROR, ETHERNET_SERVER_TAG, "Failed to start unicast server!");
             g_unicastServerSocketFD = -1;
             u_mutex_unlock(g_mutexUnicastServer);
             return CA_STATUS_FAILED;
@@ -722,7 +722,7 @@ CAResult_t CAEthernetStartUnicastServer(const char *localAddress, uint16_t *port
         if (CA_STATUS_OK != CAStartUnicastServer(localAddress, port, forceStart, isSecured,
                 &g_secureUnicastServerSocketFD))
         {
-            OIC_LOG_V(ERROR, ETHERNET_SERVER_TAG, "Failed to start unicast server!");
+            OIC_LOG(ERROR, ETHERNET_SERVER_TAG, "Failed to start unicast server!");
             g_secureUnicastServerSocketFD = -1;
             u_mutex_unlock(g_mutexSecureUnicastServer);
             return CA_STATUS_FAILED;
@@ -749,7 +749,7 @@ CAResult_t CAEthernetStartMulticastServer(const char *localAddress,
     uint16_t port = multicastPort;
     if (0 >= port)
     {
-        OIC_LOG_V(ERROR, ETHERNET_SERVER_TAG, "Invalid input: Multicast port is invalid!");
+        OIC_LOG(ERROR, ETHERNET_SERVER_TAG, "Invalid input: Multicast port is invalid!");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -757,7 +757,7 @@ CAResult_t CAEthernetStartMulticastServer(const char *localAddress,
 
     if (g_multicastServerSocketFD != -1)
     {
-        OIC_LOG_V(ERROR, ETHERNET_SERVER_TAG, "Multicast Server is already running!");
+        OIC_LOG(ERROR, ETHERNET_SERVER_TAG, "Multicast Server is already running!");
         u_mutex_unlock(g_mutexMulticastServer);
         return CA_SERVER_STARTED_ALREADY;
     }
index c63b66e..4694d32 100644 (file)
@@ -117,7 +117,7 @@ void CASendNetworkChangeCallback(CANetworkStatus_t currNetworkStatus);
 
 CAResult_t CAWiFiInitializeNetworkMonitor(const u_thread_pool_t threadPool)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     g_threadPool = threadPool;
 
@@ -135,13 +135,13 @@ CAResult_t CAWiFiInitializeNetworkMonitor(const u_thread_pool_t threadPool)
 
     g_nwConnectivityStatus = (g_wifiIPAddress) ? CA_INTERFACE_UP : CA_INTERFACE_DOWN;
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 void CAWiFiTerminateNetworkMonitor(void)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     g_threadPool = NULL;
 
@@ -173,12 +173,12 @@ void CAWiFiTerminateNetworkMonitor(void)
         g_wifiNetInfoMutex = NULL;
     }
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
 }
 
 CAResult_t CAWiFiStartNetworkMonitor(void)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     u_mutex_lock(g_wifiNetInfoMutex);
     g_stopNetworkMonitor = false;
@@ -190,7 +190,7 @@ CAResult_t CAWiFiStartNetworkMonitor(void)
 
 CAResult_t CAWiFiStopNetworkMonitor(void)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     u_mutex_lock(g_wifiNetInfoMutex);
 
@@ -205,13 +205,13 @@ CAResult_t CAWiFiStopNetworkMonitor(void)
 
     u_mutex_unlock(g_wifiNetInfoMutex);
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAWiFiGetInterfaceInfo(char **interfaceName, char **ipAddress)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     VERIFY_NON_NULL(interfaceName, WIFI_MONITOR_TAG, "interface name");
     VERIFY_NON_NULL(ipAddress, WIFI_MONITOR_TAG, "ip address");
@@ -221,7 +221,7 @@ CAResult_t CAWiFiGetInterfaceInfo(char **interfaceName, char **ipAddress)
 
     if(g_wifiInterfaceName == NULL || g_wifiIPAddress == NULL)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "Network not enabled");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "Network not enabled");
         return CA_ADAPTER_NOT_ENABLED;
 
     }
@@ -239,14 +239,14 @@ CAResult_t CAWiFiGetInterfaceInfo(char **interfaceName, char **ipAddress)
 
 CAResult_t CAWiFiGetInterfaceSubnetMask(char **subnetMask)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     VERIFY_NON_NULL(subnetMask, WIFI_MONITOR_TAG, "subnet mask");
 
     u_mutex_lock(g_wifiNetInfoMutex);
     if(NULL == g_wifiSubnetMask)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "There is no subnet mask information!");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "There is no subnet mask information!");
         u_mutex_unlock(g_wifiNetInfoMutex);
         return CA_STATUS_FAILED;
     }
@@ -255,7 +255,7 @@ CAResult_t CAWiFiGetInterfaceSubnetMask(char **subnetMask)
                                : NULL;
     u_mutex_unlock(g_wifiNetInfoMutex);
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
@@ -267,11 +267,11 @@ bool CAWiFiIsConnected(void)
 void CAWiFiSetConnectionStateChangeCallback(
     CAWiFiConnectionStateChangeCallback callback)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     g_networkChangeCb = callback;
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
 }
 
 void CAWiFiUpdateInterfaceInformation(char **interfaceName, char **ipAddress,
@@ -386,7 +386,7 @@ void CAWiFiUpdateInterfaceInformation(char **interfaceName, char **ipAddress,
         }
         else
         {
-            OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "did not match name : wlan");
+            OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "did not match name : wlan");
         }
 
         OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG,
@@ -401,24 +401,24 @@ void CAWiFiUpdateInterfaceInformation(char **interfaceName, char **ipAddress,
 
 void CAWiFiJniInit(JavaVM* jvm)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] CAWiFiJniInit");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] CAWiFiJniInit");
     g_jvm = jvm;
 }
 
 void CAJniSetContext(jobject context)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "caWifiSetObject");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "caWifiSetObject");
     g_context = context;
 }
 
 void CACreateWiFiJNIInterfaceObject(jobject context)
 {
     JNIEnv* env;
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] CACreateWiFiJNIInterfaceObject");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] CACreateWiFiJNIInterfaceObject");
 
     if ((*g_jvm)->GetEnv(g_jvm, (void**) &env, JNI_VERSION_1_6) != JNI_OK)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] Could not get JNIEnv pointer");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] Could not get JNIEnv pointer");
         return;
     }
 
@@ -426,7 +426,7 @@ void CACreateWiFiJNIInterfaceObject(jobject context)
     jclass contextClass = (*env)->FindClass(env, "android/content/Context");
     if (contextClass == 0)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] Could not get context object class");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] Could not get context object class");
         return;
     }
 
@@ -434,7 +434,7 @@ void CACreateWiFiJNIInterfaceObject(jobject context)
             "getApplicationContext", "()Landroid/content/Context;");
     if (getApplicationContextMethod == 0)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] Could not get getApplicationContext method");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] Could not get getApplicationContext method");
         return;
     }
 
@@ -445,7 +445,7 @@ void CACreateWiFiJNIInterfaceObject(jobject context)
     jclass WiFiJniInterface = (*env)->FindClass(env, "com/iotivity/jar/CAWiFiInterface");
     if (!WiFiJniInterface)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] Could not get CAWiFiInterface class");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] Could not get CAWiFiInterface class");
         return;
     }
 
@@ -453,13 +453,13 @@ void CACreateWiFiJNIInterfaceObject(jobject context)
             WiFiJniInterface, "<init>", "(Landroid/content/Context;)V");
     if (!WiFiInterfaceConstructorMethod)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] Could not get CAWiFiInterface constructor method");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] Could not get CAWiFiInterface constructor method");
         return;
     }
 
     (*env)->NewObject(env, WiFiJniInterface, WiFiInterfaceConstructorMethod, gApplicationContext);
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "[WIFICore]Create CAWiFiInterface instance");
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] NewObject Successs");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "[WIFICore]Create CAWiFiInterface instance");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "[WIFICore] NewObject Successs");
 
 }
 
@@ -481,7 +481,7 @@ void CASendNetworkChangeCallback(CANetworkStatus_t currNetworkStatus)
 
     if(NULL == g_networkChangeCb)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "[WiFiCore] g_networkChangeCb is NULL");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "[WiFiCore] g_networkChangeCb is NULL");
         u_mutex_lock(g_wifiNetInfoMutex);
         return;
     }
@@ -508,11 +508,11 @@ JNIEXPORT void JNICALL Java_com_iotivity_jar_cawifiinterface_CAWiFiStateEnabled
   (JNIEnv *env, jclass class)
 {
     CANetworkStatus_t currNetworkStatus = CA_INTERFACE_UP;
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "[WiFiCore] CAWiFiStateEnabled");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "[WiFiCore] CAWiFiStateEnabled");
 
     if (currNetworkStatus == g_nwConnectivityStatus)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "[WiFiCore] Network State not changed");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "[WiFiCore] Network State not changed");
         return;
     }
 
@@ -524,11 +524,11 @@ JNIEXPORT void JNICALL Java_com_iotivity_jar_cawifiinterface_CAWiFiStateDisabled
   (JNIEnv *env, jclass class)
 {
     CANetworkStatus_t currNetworkStatus = CA_INTERFACE_DOWN;
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "[WiFiCore] CAWiFiStateDisabled");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "[WiFiCore] CAWiFiStateDisabled");
 
     if (currNetworkStatus == g_nwConnectivityStatus)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "[WiFiCore] Network State not changed");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "[WiFiCore] Network State not changed");
         return;
     }
     CASendNetworkChangeCallback(currNetworkStatus);
index fc725d7..4fe485c 100644 (file)
@@ -218,7 +218,7 @@ static void CAReceiveHandler(void *data)
         if(NULL == srcIPAddress)
         {
             OICFree(ctx);
-            OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Error in OICStrdup, exit CAReceiveHandler");
+            OIC_LOG(ERROR, WIFI_SERVER_TAG, "Error in OICStrdup, exit CAReceiveHandler");
             break;
         }
 
@@ -230,7 +230,7 @@ static void CAReceiveHandler(void *data)
         char *netMask = NULL;
         if (CA_STATUS_OK != CAWiFiGetInterfaceSubnetMask(&netMask))
         {
-            OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Failed to get ethernet subnet");
+            OIC_LOG(ERROR, WIFI_SERVER_TAG, "Failed to get ethernet subnet");
             OICFree(srcIPAddress);
             continue;
         }
@@ -267,7 +267,7 @@ static void CAReceiveHandler(void *data)
 #endif //__WITH_DTLS__
             default:
                 // Should never occur
-                OIC_LOG_V(DEBUG, WIFI_SERVER_TAG, "Invalid server type");
+                OIC_LOG(DEBUG, WIFI_SERVER_TAG, "Invalid server type");
                 OICFree(srcIPAddress);
                 OICFree(ctx);
                 return;
@@ -543,7 +543,7 @@ CAResult_t CAWiFiStartUnicastServer(const char *localAddress, uint16_t *port,
 
     if (0 >= *port)
     {
-        OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Invalid input: port is invalid!");
+        OIC_LOG(ERROR, WIFI_SERVER_TAG, "Invalid input: port is invalid!");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -565,7 +565,7 @@ CAResult_t CAWiFiStartUnicastServer(const char *localAddress, uint16_t *port,
         if (CA_STATUS_OK != CAStartUnicastServer(localAddress, port, forceStart, isSecured,
                 &g_unicastServerSocketFD))
         {
-            OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Failed to start unicast server!");
+            OIC_LOG(ERROR, WIFI_SERVER_TAG, "Failed to start unicast server!");
             close(g_unicastServerSocketFD);
             g_unicastServerSocketFD = -1;
             u_mutex_unlock(g_mutexUnicastServer);
@@ -593,7 +593,7 @@ CAResult_t CAWiFiStartUnicastServer(const char *localAddress, uint16_t *port,
         if (CA_STATUS_OK != CAStartUnicastServer(localAddress, port, forceStart, isSecured,
                 &g_secureUnicastServerSocketFD))
         {
-            OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Failed to start unicast server!");
+            OIC_LOG(ERROR, WIFI_SERVER_TAG, "Failed to start unicast server!");
             g_secureUnicastServerSocketFD = -1;
             u_mutex_unlock(g_mutexSecureUnicastServer);
             return CA_STATUS_FAILED;
@@ -620,7 +620,7 @@ CAResult_t CAWiFiStartMulticastServer(const char *localAddress, const char *mult
     uint16_t port = multicastPort;
     if (0 >= port)
     {
-        OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Invalid input: Multicast port is invalid!");
+        OIC_LOG(ERROR, WIFI_SERVER_TAG, "Invalid input: Multicast port is invalid!");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -628,7 +628,7 @@ CAResult_t CAWiFiStartMulticastServer(const char *localAddress, const char *mult
 
     if (g_multicastServerSocketFD != -1)
     {
-        OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Multicast Server is already running!");
+        OIC_LOG(ERROR, WIFI_SERVER_TAG, "Multicast Server is already running!");
         u_mutex_unlock(g_mutexMulticastServer);
         return CA_SERVER_STARTED_ALREADY;
     }
index 67336b6..fac3140 100644 (file)
@@ -201,7 +201,7 @@ void CAWiFiNotifyNetworkChange(const char *address, uint16_t port,
     CALocalConnectivity_t *localEndpoint = CAAdapterCreateLocalEndpoint(CA_WIFI, address);
     if (!localEndpoint)
     {
-        OIC_LOG_V(ERROR, WIFI_ADAPTER_TAG, "Out of memory");
+        OIC_LOG(ERROR, WIFI_ADAPTER_TAG, "Out of memory");
         return;
     }
 
@@ -562,7 +562,7 @@ int32_t CASendWIFIData(const CARemoteEndpoint_t *remoteEndpoint, const void *dat
 
     if (0 == dataLength)
     {
-        OIC_LOG_V(ERROR, WIFI_ADAPTER_TAG, "Invalid Data Length");
+        OIC_LOG(ERROR, WIFI_ADAPTER_TAG, "Invalid Data Length");
         return dataSize;
     }
 
@@ -570,7 +570,7 @@ int32_t CASendWIFIData(const CARemoteEndpoint_t *remoteEndpoint, const void *dat
     CAWiFiData *wifiData = CACreateWiFiData(remoteEndpoint, data, dataLength);
     if (!wifiData)
     {
-        OIC_LOG_V(ERROR, WIFI_ADAPTER_TAG, "Failed to create wifidata!");
+        OIC_LOG(ERROR, WIFI_ADAPTER_TAG, "Failed to create wifidata!");
         return dataSize;
     }
 
index 9d14ce2..e0e961d 100644 (file)
@@ -117,7 +117,7 @@ static void CANetworkMonitorThread(void *threadData);
 
 CAResult_t CAWiFiInitializeNetworkMonitor(const u_thread_pool_t threadPool)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     g_threadPool = threadPool;
 
@@ -132,13 +132,13 @@ CAResult_t CAWiFiInitializeNetworkMonitor(const u_thread_pool_t threadPool)
 
     g_nwConnectivityStatus = (g_wifiIPAddress) ? CA_INTERFACE_UP : CA_INTERFACE_DOWN;
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 void CAWiFiTerminateNetworkMonitor(void)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     g_threadPool = NULL;
 
@@ -166,12 +166,12 @@ void CAWiFiTerminateNetworkMonitor(void)
         g_wifiNetInfoMutex = NULL;
     }
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
 }
 
 CAResult_t CAWiFiStartNetworkMonitor(void)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     u_mutex_lock(g_wifiNetInfoMutex);
     g_stopNetworkMonitor = false;
@@ -179,7 +179,7 @@ CAResult_t CAWiFiStartNetworkMonitor(void)
 
     if (g_stopNetworkMonitor)
     {
-        OIC_LOG_V(ERROR, WIFI_MONITOR_TAG, "Stop network monitor requested!");
+        OIC_LOG(ERROR, WIFI_MONITOR_TAG, "Stop network monitor requested!");
         return CA_STATUS_FAILED;
     }
 
@@ -196,7 +196,7 @@ CAResult_t CAWiFiStartNetworkMonitor(void)
 
 CAResult_t CAWiFiStopNetworkMonitor(void)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     if (g_stopNetworkMonitor)
     {
@@ -209,13 +209,13 @@ CAResult_t CAWiFiStopNetworkMonitor(void)
     g_stopNetworkMonitor = true;
     u_mutex_unlock(g_wifiNetInfoMutex);
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAWiFiGetInterfaceInfo(char **interfaceName, char **ipAddress)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     VERIFY_NON_NULL(interfaceName, WIFI_MONITOR_TAG, "interface name");
     VERIFY_NON_NULL(ipAddress, WIFI_MONITOR_TAG, "ip address");
@@ -225,7 +225,7 @@ CAResult_t CAWiFiGetInterfaceInfo(char **interfaceName, char **ipAddress)
 
     if (g_wifiInterfaceName == NULL || g_wifiIPAddress == NULL)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "Network not enabled");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "Network not enabled");
         return CA_ADAPTER_NOT_ENABLED;
 
     }
@@ -242,14 +242,14 @@ CAResult_t CAWiFiGetInterfaceInfo(char **interfaceName, char **ipAddress)
 
 CAResult_t CAWiFiGetInterfaceSubnetMask(char **subnetMask)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     VERIFY_NON_NULL(subnetMask, WIFI_MONITOR_TAG, "subnet mask");
 
     u_mutex_lock(g_wifiNetInfoMutex);
     if (NULL == g_wifiSubnetMask)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "There is no subnet mask information!");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "There is no subnet mask information!");
         return CA_STATUS_FAILED;
     }
 
@@ -257,13 +257,13 @@ CAResult_t CAWiFiGetInterfaceSubnetMask(char **subnetMask)
                   : NULL;
     u_mutex_unlock(g_wifiNetInfoMutex);
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 bool CAWiFiIsConnected(void)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     if (g_nwConnectivityStatus == CA_INTERFACE_DOWN)
         return false;
@@ -274,7 +274,7 @@ bool CAWiFiIsConnected(void)
 void CAWiFiSetConnectionStateChangeCallback(
     CAWiFiConnectionStateChangeCallback callback)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     g_networkChangeCb = callback;
 }
@@ -357,7 +357,7 @@ void CAWiFiGetInterfaceInformation(char **interfaceName, char **ipAddress, char
 }
 void CANetworkMonitorThread(void *threadData)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     while (!g_stopNetworkMonitor)
     {
@@ -398,6 +398,6 @@ void CANetworkMonitorThread(void *threadData)
         OICFree(subnetMask);
     }
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
 }
 
index 24189ae..afb10f5 100644 (file)
@@ -307,7 +307,7 @@ static void CAReceiveHandler(void *data)
         char *netMask = NULL;
         if (CA_STATUS_OK != CAWiFiGetInterfaceSubnetMask(&netMask))
         {
-            OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Failed to get ethernet subnet");
+            OIC_LOG(ERROR, WIFI_SERVER_TAG, "Failed to get ethernet subnet");
             continue;
         }
 
@@ -346,7 +346,7 @@ static void CAReceiveHandler(void *data)
 #endif //__WITH_DTLS__
             default:
                 // Should never occur
-                OIC_LOG_V(DEBUG, WIFI_SERVER_TAG, "Invalid server type");
+                OIC_LOG(DEBUG, WIFI_SERVER_TAG, "Invalid server type");
                 if (ctx->stopFd != -1)
                 {
                     close(ctx->stopFd);
@@ -660,7 +660,7 @@ CAResult_t CAWiFiStartUnicastServer(const char *localAddress, uint16_t *port, co
 
     if (0 >= *port)
     {
-        OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Invalid input: port is invalid!");
+        OIC_LOG(ERROR, WIFI_SERVER_TAG, "Invalid input: port is invalid!");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -683,7 +683,7 @@ CAResult_t CAWiFiStartUnicastServer(const char *localAddress, uint16_t *port, co
                 != CAStartUnicastServer(localAddress, port, forceStart, isSecured,
                         &g_unicastServerSocketFD))
         {
-            OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Failed to start unicast server!");
+            OIC_LOG(ERROR, WIFI_SERVER_TAG, "Failed to start unicast server!");
             g_unicastServerSocketFD = -1;
             u_mutex_unlock(g_mutexUnicastServer);
             return CA_STATUS_FAILED;
@@ -710,7 +710,7 @@ CAResult_t CAWiFiStartUnicastServer(const char *localAddress, uint16_t *port, co
         if (CA_STATUS_OK != CAStartUnicastServer(localAddress, port, forceStart, isSecured,
                         &g_secureUnicastServerSocketFD))
         {
-            OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Failed to start unicast server!");
+            OIC_LOG(ERROR, WIFI_SERVER_TAG, "Failed to start unicast server!");
             g_secureUnicastServerSocketFD = -1;
             u_mutex_unlock(g_mutexSecureUnicastServer);
             return CA_STATUS_FAILED;
@@ -737,7 +737,7 @@ CAResult_t CAWiFiStartMulticastServer(const char *localAddress, const char *mult
     uint16_t port = multicastPort;
     if (0 >= port)
     {
-        OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Invalid input: Multicast port is invalid!");
+        OIC_LOG(ERROR, WIFI_SERVER_TAG, "Invalid input: Multicast port is invalid!");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -745,7 +745,7 @@ CAResult_t CAWiFiStartMulticastServer(const char *localAddress, const char *mult
 
     if (g_multicastServerSocketFD != -1)
     {
-        OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Multicast Server is already running!");
+        OIC_LOG(ERROR, WIFI_SERVER_TAG, "Multicast Server is already running!");
         u_mutex_unlock(g_mutexMulticastServer);
         return CA_SERVER_STARTED_ALREADY;
     }
index bf71e95..7a8a0a7 100644 (file)
@@ -82,13 +82,13 @@ static void CAWiFiGetInterfaceInformation(char **interfaceName, char **ipAddress
 
 CAResult_t CAWiFiInitializeNetworkMonitor(const u_thread_pool_t threadPool)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     // Initialize Wifi service
     wifi_error_e ret = wifi_initialize();
     if (WIFI_ERROR_NONE != ret)
     {
-        OIC_LOG_V(ERROR, WIFI_MONITOR_TAG, "wifi_initialize failed");
+        OIC_LOG(ERROR, WIFI_MONITOR_TAG, "wifi_initialize failed");
         return CA_STATUS_FAILED;
     }
 
@@ -97,19 +97,19 @@ CAResult_t CAWiFiInitializeNetworkMonitor(const u_thread_pool_t threadPool)
         g_wifiNetInfoMutex = u_mutex_new();
     }
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 void CAWiFiTerminateNetworkMonitor(void)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     // Deinitialize Wifi service
     wifi_error_e ret = wifi_deinitialize();
     if (WIFI_ERROR_NONE != ret)
     {
-        OIC_LOG_V(INFO, WIFI_MONITOR_TAG, "wifi_deinitialize failed");
+        OIC_LOG(INFO, WIFI_MONITOR_TAG, "wifi_deinitialize failed");
     }
 
     if (g_wifiInterfaceName)
@@ -136,18 +136,18 @@ void CAWiFiTerminateNetworkMonitor(void)
         g_wifiNetInfoMutex = NULL;
     }
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
 }
 
 CAResult_t CAWiFiStartNetworkMonitor(void)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     // Set callback for receiving state changes
     wifi_error_e ret = wifi_set_device_state_changed_cb(CAWIFIDeviceStateChangedCb, NULL);
     if (WIFI_ERROR_NONE != ret)
     {
-        OIC_LOG_V(ERROR, WIFI_MONITOR_TAG, "wifi_set_device_state_changed_cb failed");
+        OIC_LOG(ERROR, WIFI_MONITOR_TAG, "wifi_set_device_state_changed_cb failed");
         return CA_STATUS_FAILED;
     }
 
@@ -155,41 +155,41 @@ CAResult_t CAWiFiStartNetworkMonitor(void)
     ret = wifi_set_connection_state_changed_cb(CAWIFIConnectionStateChangedCb, NULL);
     if (WIFI_ERROR_NONE != ret)
     {
-        OIC_LOG_V(ERROR, WIFI_MONITOR_TAG, "wifi_set_connection_state_changed_cb failed");
+        OIC_LOG(ERROR, WIFI_MONITOR_TAG, "wifi_set_connection_state_changed_cb failed");
         return CA_STATUS_FAILED;
     }
 
     CAWiFiGetInterfaceInformation(&g_wifiInterfaceName, &g_wifiIPAddress, &g_wifiSubnetMask);
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAWiFiStopNetworkMonitor(void)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     // Reset callback for receiving state changes
     wifi_error_e ret = wifi_unset_device_state_changed_cb();
     if (WIFI_ERROR_NONE != ret)
     {
-        OIC_LOG_V(INFO, WIFI_MONITOR_TAG, "wifi_unset_device_state_changed_cb failed");
+        OIC_LOG(INFO, WIFI_MONITOR_TAG, "wifi_unset_device_state_changed_cb failed");
     }
 
     // Reset callback for receiving connection state changes
     ret = wifi_unset_connection_state_changed_cb();
     if (WIFI_ERROR_NONE != ret)
     {
-        OIC_LOG_V(INFO, WIFI_MONITOR_TAG, "wifi_unset_connection_state_changed_cb failed");
+        OIC_LOG(INFO, WIFI_MONITOR_TAG, "wifi_unset_connection_state_changed_cb failed");
     }
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAWiFiGetInterfaceInfo(char **interfaceName, char **ipAddress)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     VERIFY_NON_NULL(interfaceName, WIFI_MONITOR_TAG, "interface name holder is NULL");
     VERIFY_NON_NULL(ipAddress, WIFI_MONITOR_TAG, "IP address holder is NULL");
@@ -198,7 +198,7 @@ CAResult_t CAWiFiGetInterfaceInfo(char **interfaceName, char **ipAddress)
 
     if (NULL == g_wifiInterfaceName || NULL == g_wifiIPAddress)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "Network not enabled");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "Network not enabled");
         u_mutex_unlock(g_wifiNetInfoMutex);
         return CA_ADAPTER_NOT_ENABLED;
     }
@@ -215,20 +215,20 @@ CAResult_t CAWiFiGetInterfaceInfo(char **interfaceName, char **ipAddress)
 
     u_mutex_unlock(g_wifiNetInfoMutex);
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 CAResult_t CAWiFiGetInterfaceSubnetMask(char **subnetMask)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     VERIFY_NON_NULL(subnetMask, WIFI_MONITOR_TAG, "subnet mask");
 
     u_mutex_lock(g_wifiNetInfoMutex);
     if (NULL == g_wifiSubnetMask)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "There is no subnet mask information!");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "There is no subnet mask information!");
         u_mutex_unlock(g_wifiNetInfoMutex);
         return CA_STATUS_FAILED;
     }
@@ -236,36 +236,36 @@ CAResult_t CAWiFiGetInterfaceSubnetMask(char **subnetMask)
     *subnetMask = (g_wifiSubnetMask) ? OICStrdup((const char *)g_wifiSubnetMask): NULL;
     u_mutex_unlock(g_wifiNetInfoMutex);
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
     return CA_STATUS_OK;
 }
 
 bool CAWiFiIsConnected(void)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     wifi_connection_state_e connection_state;
     wifi_error_e ret = wifi_get_connection_state(&connection_state);
     if (WIFI_ERROR_NONE != ret)
     {
-        OIC_LOG_V(ERROR, WIFI_MONITOR_TAG, "Failed to get the Connection State");
+        OIC_LOG(ERROR, WIFI_MONITOR_TAG, "Failed to get the Connection State");
         return false;
     }
 
     if (WIFI_CONNECTION_STATE_DISCONNECTED == connection_state)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "WIFI is not Connected");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "WIFI is not Connected");
         return false;
     }
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
     return true;
 }
 
 void CAWiFiSetConnectionStateChangeCallback(
     CAWiFiConnectionStateChangeCallback callback)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     g_networkChangeCb = callback;
 }
@@ -273,12 +273,12 @@ void CAWiFiSetConnectionStateChangeCallback(
 void CAWIFIConnectionStateChangedCb(wifi_connection_state_e state, wifi_ap_h ap,
                                     void *userData)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     if (WIFI_CONNECTION_STATE_ASSOCIATION == state
         || WIFI_CONNECTION_STATE_CONFIGURATION == state)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "Connection is in Association State");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "Connection is in Association State");
         return;
     }
 
@@ -317,31 +317,31 @@ void CAWIFIConnectionStateChangedCb(wifi_connection_state_e state, wifi_ap_h ap,
         g_networkChangeCb(g_wifiIPAddress, nwStatus);
     }
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
     return;
 }
 
 void CAWIFIDeviceStateChangedCb(wifi_device_state_e state, void *userData)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     if (WIFI_DEVICE_STATE_ACTIVATED == state)
     {
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "Wifi is in Activated State");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "Wifi is in Activated State");
     }
     else
     {
         CAWIFIConnectionStateChangedCb(WIFI_CONNECTION_STATE_DISCONNECTED, NULL, NULL);
-        OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "Wifi is in Deactivated State");
+        OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "Wifi is in Deactivated State");
     }
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
     return;
 }
 
 void CAWiFiGetInterfaceInformation(char **interfaceName, char **ipAddress, char **subnetMask)
 {
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "IN");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "IN");
 
     int ret = WIFI_ERROR_NONE;
 
@@ -400,6 +400,6 @@ void CAWiFiGetInterfaceInformation(char **interfaceName, char **ipAddress, char
 
     u_mutex_unlock(g_wifiNetInfoMutex);
 
-    OIC_LOG_V(DEBUG, WIFI_MONITOR_TAG, "OUT");
+    OIC_LOG(DEBUG, WIFI_MONITOR_TAG, "OUT");
 }
 
index bd3e28b..45b14e4 100644 (file)
@@ -226,7 +226,7 @@ static void CAReceiveHandler(void *data)
         char *netMask = NULL;
         if (CA_STATUS_OK != CAWiFiGetInterfaceSubnetMask(&netMask))
         {
-            OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Failed to get ethernet subnet");
+            OIC_LOG(ERROR, WIFI_SERVER_TAG, "Failed to get ethernet subnet");
             continue;
         }
 
@@ -264,7 +264,7 @@ static void CAReceiveHandler(void *data)
 #endif //__WITH_DTLS__
             default:
                 // Should never occur
-                OIC_LOG_V(DEBUG, WIFI_SERVER_TAG, "Invalid server type");
+                OIC_LOG(DEBUG, WIFI_SERVER_TAG, "Invalid server type");
                 OICFree(ctx);
                 return;
         }
@@ -555,7 +555,7 @@ CAResult_t CAWiFiStartUnicastServer(const char *localAddress, uint16_t *port,
 
     if (0 >= *port)
     {
-        OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Invalid input: port is invalid!");
+        OIC_LOG(ERROR, WIFI_SERVER_TAG, "Invalid input: port is invalid!");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -577,7 +577,7 @@ CAResult_t CAWiFiStartUnicastServer(const char *localAddress, uint16_t *port,
         if (CA_STATUS_OK != CAStartUnicastServer(localAddress, port, forceStart, isSecured,
                 &g_unicastServerSocketFD))
         {
-            OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Failed to start unicast server!");
+            OIC_LOG(ERROR, WIFI_SERVER_TAG, "Failed to start unicast server!");
             g_unicastServerSocketFD = -1;
             u_mutex_unlock(g_mutexUnicastServer);
             return CA_STATUS_FAILED;
@@ -604,7 +604,7 @@ CAResult_t CAWiFiStartUnicastServer(const char *localAddress, uint16_t *port,
         if (CA_STATUS_OK != CAStartUnicastServer(localAddress, port, forceStart, isSecured,
                 &g_secureUnicastServerSocketFD))
         {
-            OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Failed to start unicast server!");
+            OIC_LOG(ERROR, WIFI_SERVER_TAG, "Failed to start unicast server!");
             g_secureUnicastServerSocketFD = -1;
             u_mutex_unlock(g_mutexSecureUnicastServer);
             return CA_STATUS_FAILED;
@@ -631,7 +631,7 @@ CAResult_t CAWiFiStartMulticastServer(const char *localAddress, const char *mult
     uint16_t port = multicastPort;
     if (0 >= port)
     {
-        OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Invalid input: Multicast port is invalid!");
+        OIC_LOG(ERROR, WIFI_SERVER_TAG, "Invalid input: Multicast port is invalid!");
         return CA_STATUS_INVALID_PARAM;
     }
 
@@ -639,7 +639,7 @@ CAResult_t CAWiFiStartMulticastServer(const char *localAddress, const char *mult
 
     if (g_multicastServerSocketFD != -1)
     {
-        OIC_LOG_V(ERROR, WIFI_SERVER_TAG, "Multicast Server is already running!");
+        OIC_LOG(ERROR, WIFI_SERVER_TAG, "Multicast Server is already running!");
         u_mutex_unlock(g_mutexMulticastServer);
         return CA_SERVER_STARTED_ALREADY;
     }