[GATT] Fix ATT application ecode
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-adapter-le.c
index a7f38eb..018db76 100644 (file)
@@ -100,6 +100,7 @@ BT_EXPORT_API int bluetooth_start_le_discovery(void)
        BT_INIT_PARAMS();
        BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
 
+       BT_INFO_C("### Start LE scan");
        result = _bt_send_request(BT_BLUEZ_SERVICE, BT_START_LE_DISCOVERY,
                in_param1, in_param2, in_param3, in_param4, &out_param);
 
@@ -120,6 +121,7 @@ BT_EXPORT_API int bluetooth_stop_le_discovery(void)
        BT_INIT_PARAMS();
        BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
 
+       BT_INFO_C("### Stop LE scan");
        result = _bt_send_request(BT_BLUEZ_SERVICE, BT_STOP_LE_DISCOVERY,
                in_param1, in_param2, in_param3, in_param4, &out_param);
 
@@ -241,7 +243,6 @@ BT_EXPORT_API int bluetooth_unregister_all_scan_filters(void)
        return result;
 }
 
-#ifdef TIZEN_PROFILE_WEARABLE
 gboolean __bluetooth_is_privileged_process(void)
 {
        FILE *fp = NULL;
@@ -263,7 +264,6 @@ gboolean __bluetooth_is_privileged_process(void)
        fclose(fp);
        return FALSE;
 }
-#endif
 
 BT_EXPORT_API int bluetooth_set_advertising(int handle, gboolean enable)
 {
@@ -272,9 +272,8 @@ BT_EXPORT_API int bluetooth_set_advertising(int handle, gboolean enable)
 
        BT_CHECK_ENABLED_ANY(return);
 
-#ifdef TIZEN_PROFILE_WEARABLE
-       use_reserved_slot = __bluetooth_is_privileged_process();
-#endif
+       if (TIZEN_PROFILE_WEARABLE)
+               use_reserved_slot = __bluetooth_is_privileged_process();
 
        BT_INIT_PARAMS();
        BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
@@ -299,9 +298,8 @@ BT_EXPORT_API int bluetooth_set_custom_advertising(int handle, gboolean enable,
 
        BT_CHECK_ENABLED_ANY(return);
 
-#ifdef TIZEN_PROFILE_WEARABLE
+       if (TIZEN_PROFILE_WEARABLE)
        use_reserved_slot = __bluetooth_is_privileged_process();
-#endif
 
        BT_INIT_PARAMS();
        BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
@@ -358,9 +356,8 @@ BT_EXPORT_API int bluetooth_set_advertising_data(int handle, const bluetooth_adv
        if (length > BLUETOOTH_ADVERTISING_DATA_LENGTH_MAX - 3)
                return BLUETOOTH_ERROR_INVALID_PARAM;
 
-#ifdef TIZEN_PROFILE_WEARABLE
-       use_reserved_slot = __bluetooth_is_privileged_process();
-#endif
+       if (TIZEN_PROFILE_WEARABLE)
+               use_reserved_slot = __bluetooth_is_privileged_process();
 
        BT_INIT_PARAMS();
        BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
@@ -418,9 +415,8 @@ BT_EXPORT_API int bluetooth_set_scan_response_data(int handle,
        if (length > BLUETOOTH_SCAN_RESP_DATA_LENGTH_MAX)
                return BLUETOOTH_ERROR_INVALID_PARAM;
 
-#ifdef TIZEN_PROFILE_WEARABLE
-       use_reserved_slot = __bluetooth_is_privileged_process();
-#endif
+       if (TIZEN_PROFILE_WEARABLE)
+               use_reserved_slot = __bluetooth_is_privileged_process();
 
        BT_INIT_PARAMS();
        BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);