Fix : PSCAN is not disabled after ACL connected 29/227029/1
authorinjun.yang <injun.yang@samsung.com>
Mon, 9 Mar 2020 01:56:12 +0000 (10:56 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Mon, 9 Mar 2020 06:31:48 +0000 (15:31 +0900)
[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] Internal
[Occurrence Version] N/A

[Problem] pscan is not turned off after connected with remote device
[Cause & Measure] Kernel didn't control PSCAN since bt-service have request connectable mode to stack.
 So do not request connectable mode to handle pscan into kernel side.
[Checking Method] connect GM and check pscan status

[Team] Convergence BT
[Developer] Injun Yang
[Solution company] Samsung
[Change Type] Specification change

Change-Id: Ia4252768f79661c3e6ec6243c0ebdd6a21b58fcc

bt-service-adaptation/services/adapter/bt-service-core-adapter-le.c
bt-service-adaptation/services/adapter/bt-service-core-adapter.c

index dc5abdd..d10de14 100644 (file)
@@ -2285,7 +2285,7 @@ int _bt_set_le_static_random_address(gboolean is_enable)
 
        result =  adapter_set_le_static_random_address(is_enable);
        if (result != OAL_STATUS_SUCCESS) {
-               BT_ERR("adapter_set_connectable failed: %d", result);
+               BT_ERR("adapter_set_le_static_random_address failed: %d", result);
                result = BLUETOOTH_ERROR_INTERNAL;
        } else {
                BT_INFO("SetLeStaticRandomAddress as %d", is_enable);
index 0f7823d..8a0a58b 100644 (file)
@@ -1876,12 +1876,6 @@ static void __bt_set_visible_mode(void)
                        if (vconf_set_int(BT_FILE_VISIBLE_TIME, 0) != 0)
                                BT_ERR("Set vconf failed");
                }
-       } else {
-               if (_bt_set_discoverable_mode(
-                                       BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE,
-                                       timeout) != BLUETOOTH_ERROR_NONE) {
-                       BT_ERR("Set connectable mode failed");
-               }
        }
 #else
        if (timeout == -1) {
@@ -1891,12 +1885,6 @@ static void __bt_set_visible_mode(void)
                        if (vconf_set_int(BT_FILE_VISIBLE_TIME, 0) != 0)
                                BT_ERR("Set vconf failed");
                }
-       } else {
-               if (_bt_set_discoverable_mode(
-                                       BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE,
-                                       timeout) != BLUETOOTH_ERROR_NONE) {
-                       BT_ERR("Set connectable mode failed");
-               }
        }
 #endif
 }