removed buffer size defined previously in android edr server
authorjihwan.seo <jihwan.seo@samsung.com>
Wed, 24 Feb 2016 07:28:45 +0000 (16:28 +0900)
committerJon A. Cruz <jonc@osg.samsung.com>
Fri, 26 Feb 2016 05:34:19 +0000 (05:34 +0000)
also some incorrect log message was modified.

Change-Id: I982f90a292971e4b4cb9fbc1dd0413aa09465665
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5171
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
resource/csdk/connectivity/src/bt_edr_adapter/android/caedrclient.c
resource/csdk/connectivity/src/bt_edr_adapter/android/caedrserver.c

index 0b2b1e7..16e588a 100644 (file)
@@ -34,7 +34,6 @@
 #include "caadapterutils.h"
 #include "caremotehandler.h"
 
-//#define DEBUG_MODE
 #define TAG PCF("OIC_CA_EDR_CLIENT")
 
 static const char METHODID_CONTEXTNONPARAM[] = "()Landroid/content/Context;";
@@ -846,8 +845,8 @@ CAResult_t CAEDRNativeSendData(JNIEnv *env, const char *address, const uint8_t *
 
     if (!CAEDRNativeIsEnableBTAdapter(env))
     {
-        OIC_LOG(ERROR, TAG, "BT adpater is not enable");
-        return CA_STATUS_INVALID_PARAM;
+        OIC_LOG(INFO, TAG, "BT adapter is not enabled");
+        return CA_ADAPTER_NOT_ENABLED;
     }
 
     if (STATE_DISCONNECTED == CAEDRIsConnectedDevice(address))
@@ -969,8 +968,8 @@ CAResult_t CAEDRNativeConnect(JNIEnv *env, const char *address)
 
     if (!CAEDRNativeIsEnableBTAdapter(env))
     {
-        OIC_LOG(ERROR, TAG, "BT adpater is not enable");
-        return CA_STATUS_INVALID_PARAM;
+        OIC_LOG(INFO, TAG, "BT adapter is not enabled");
+        return CA_ADAPTER_NOT_ENABLED;
     }
 
     jclass jni_cid_BTAdapter = (*env)->FindClass(env, CLASSPATH_BT_ADPATER);
index ad36e2f..7649421 100644 (file)
@@ -34,9 +34,7 @@
 #include "org_iotivity_ca_CaEdrInterface.h"
 #include "oic_string.h"
 
-//#define DEBUG_MODE
 #define TAG PCF("OIC_CA_EDR_SERVER")
-#define MAX_PDU_BUFFER (1024)
 
 static const char METHODID_OBJECTNONPARAM[] = "()Landroid/bluetooth/BluetoothAdapter;";
 static const char CLASSPATH_BT_ADPATER[] = "android/bluetooth/BluetoothAdapter";
@@ -152,7 +150,7 @@ static void CAReceiveHandler(void *data)
     {
         if (!CAEDRNativeIsEnableBTAdapter(env))
         {
-            OIC_LOG(ERROR, TAG, "BT adpater is not enable");
+            OIC_LOG(INFO, TAG, "BT adapter is not enabled");
             break;
         }
 
@@ -231,7 +229,7 @@ static void CAAcceptHandler(void *data)
         // when BT state is changed with Off. its thread will be stopped
         if (!CAEDRNativeIsEnableBTAdapter(env))
         {
-            OIC_LOG(DEBUG, TAG, "BT adpater is not enable");
+            OIC_LOG(INFO, TAG, "BT adapter is not enabled");
             ca_mutex_lock(g_mutexAcceptServer);
             g_stopAccept = true;
             ca_mutex_unlock(g_mutexAcceptServer);
@@ -898,7 +896,7 @@ jobject CAEDRNativeListen(JNIEnv *env)
 
     if (!CAEDRNativeIsEnableBTAdapter(env))
     {
-        OIC_LOG(ERROR, TAG, "BT adpater is not enable");
+        OIC_LOG(INFO, TAG, "BT adapter is not enabled");
         return NULL;
     }