From 87d25e181138804475ed567574fd4889c0a2b015 Mon Sep 17 00:00:00 2001 From: "jihwan.seo" Date: Wed, 24 Feb 2016 16:28:45 +0900 Subject: [PATCH] removed buffer size defined previously in android edr server also some incorrect log message was modified. Change-Id: I982f90a292971e4b4cb9fbc1dd0413aa09465665 Signed-off-by: jihwan.seo Reviewed-on: https://gerrit.iotivity.org/gerrit/5171 Tested-by: jenkins-iotivity Reviewed-by: Jaehong Jo Reviewed-by: Jon A. Cruz --- .../csdk/connectivity/src/bt_edr_adapter/android/caedrclient.c | 9 ++++----- .../csdk/connectivity/src/bt_edr_adapter/android/caedrserver.c | 8 +++----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrclient.c b/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrclient.c index 0b2b1e7..16e588a 100644 --- a/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrclient.c +++ b/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrclient.c @@ -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); diff --git a/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrserver.c b/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrserver.c index ad36e2f..7649421 100644 --- a/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrserver.c +++ b/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrserver.c @@ -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; } -- 2.7.4