Loading system/stack/btm/btm_sec.cc +9 −7 Original line number Diff line number Diff line Loading @@ -831,7 +831,8 @@ tBTM_STATUS btm_sec_bond_by_transport(const RawAddress& bd_addr, * -> RNR (to learn if peer is 2.1) * RNR when no ACL causes HCI_RMT_HOST_SUP_FEAT_NOTIFY_EVT */ btm_sec_cb.change_pairing_state(BTM_PAIR_STATE_GET_REM_NAME); status = BTM_ReadRemoteDeviceName(bd_addr, NULL, BT_TRANSPORT_BR_EDR); status = get_btm_client_interface().peer.BTM_ReadRemoteDeviceName( bd_addr, NULL, BT_TRANSPORT_BR_EDR); } else { /* We are accepting connection request from peer */ btm_sec_cb.change_pairing_state(BTM_PAIR_STATE_WAIT_PIN_REQ); Loading Loading @@ -2449,8 +2450,9 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr, } } else { log::warn("wrong BDA, retry with pairing BDA"); if (BTM_ReadRemoteDeviceName(btm_sec_cb.pairing_bda, NULL, BT_TRANSPORT_BR_EDR) != BTM_CMD_STARTED) { if (get_btm_client_interface().peer.BTM_ReadRemoteDeviceName( btm_sec_cb.pairing_bda, NULL, BT_TRANSPORT_BR_EDR) != BTM_CMD_STARTED) { log::error("failed to start remote name request"); NotifyBondingChange(*p_dev_rec, HCI_ERR_MEMORY_FULL); }; Loading Loading @@ -3692,8 +3694,8 @@ void btm_sec_connected(const RawAddress& bda, uint16_t handle, /* remote device name is unknowm, start getting remote name first */ btm_sec_cb.change_pairing_state(BTM_PAIR_STATE_GET_REM_NAME); if (BTM_ReadRemoteDeviceName(p_dev_rec->bd_addr, NULL, BT_TRANSPORT_BR_EDR) != if (get_btm_client_interface().peer.BTM_ReadRemoteDeviceName( p_dev_rec->bd_addr, NULL, BT_TRANSPORT_BR_EDR) != BTM_CMD_STARTED) { log::error("cannot read remote name"); btm_sec_cb.change_pairing_state(BTM_PAIR_STATE_IDLE); Loading Loading @@ -3727,8 +3729,8 @@ void btm_sec_connected(const RawAddress& bda, uint16_t handle, if (BTM_SEC_IS_SM4_UNKNOWN(p_dev_rec->sm4)) { /* Try again: RNR when no ACL causes HCI_RMT_HOST_SUP_FEAT_NOTIFY_EVT */ btm_sec_cb.change_pairing_state(BTM_PAIR_STATE_GET_REM_NAME); if (BTM_ReadRemoteDeviceName(bda, NULL, BT_TRANSPORT_BR_EDR) != BTM_CMD_STARTED) { if (get_btm_client_interface().peer.BTM_ReadRemoteDeviceName( bda, NULL, BT_TRANSPORT_BR_EDR) != BTM_CMD_STARTED) { log::error("cannot read remote name"); btm_sec_cb.change_pairing_state(BTM_PAIR_STATE_IDLE); } Loading system/test/headless/read/name.cc +6 −5 Original line number Diff line number Diff line Loading @@ -20,9 +20,9 @@ #include <future> #include "os/log.h" // android log only #include "stack/include/btm_api.h" #include "stack/include/btm_api_types.h" #include "stack/btm/neighbor_inquiry.h" #include "stack/include/bt_name.h" #include "stack/include/btm_client_interface.h" #include "test/headless/get_options.h" #include "test/headless/headless.h" #include "types/raw_address.h" Loading Loading @@ -52,7 +52,8 @@ int bluetooth::test::headless::Name::Run() { auto future = promise_.get_future(); tBTM_STATUS status = BTM_ReadRemoteDeviceName( tBTM_STATUS status = get_btm_client_interface().peer.BTM_ReadRemoteDeviceName( raw_address, &RemoteNameCallback, BT_TRANSPORT_BR_EDR); if (status != BTM_CMD_STARTED) { fprintf(stdout, "Failure to start read remote device\n"); Loading Loading
system/stack/btm/btm_sec.cc +9 −7 Original line number Diff line number Diff line Loading @@ -831,7 +831,8 @@ tBTM_STATUS btm_sec_bond_by_transport(const RawAddress& bd_addr, * -> RNR (to learn if peer is 2.1) * RNR when no ACL causes HCI_RMT_HOST_SUP_FEAT_NOTIFY_EVT */ btm_sec_cb.change_pairing_state(BTM_PAIR_STATE_GET_REM_NAME); status = BTM_ReadRemoteDeviceName(bd_addr, NULL, BT_TRANSPORT_BR_EDR); status = get_btm_client_interface().peer.BTM_ReadRemoteDeviceName( bd_addr, NULL, BT_TRANSPORT_BR_EDR); } else { /* We are accepting connection request from peer */ btm_sec_cb.change_pairing_state(BTM_PAIR_STATE_WAIT_PIN_REQ); Loading Loading @@ -2449,8 +2450,9 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr, } } else { log::warn("wrong BDA, retry with pairing BDA"); if (BTM_ReadRemoteDeviceName(btm_sec_cb.pairing_bda, NULL, BT_TRANSPORT_BR_EDR) != BTM_CMD_STARTED) { if (get_btm_client_interface().peer.BTM_ReadRemoteDeviceName( btm_sec_cb.pairing_bda, NULL, BT_TRANSPORT_BR_EDR) != BTM_CMD_STARTED) { log::error("failed to start remote name request"); NotifyBondingChange(*p_dev_rec, HCI_ERR_MEMORY_FULL); }; Loading Loading @@ -3692,8 +3694,8 @@ void btm_sec_connected(const RawAddress& bda, uint16_t handle, /* remote device name is unknowm, start getting remote name first */ btm_sec_cb.change_pairing_state(BTM_PAIR_STATE_GET_REM_NAME); if (BTM_ReadRemoteDeviceName(p_dev_rec->bd_addr, NULL, BT_TRANSPORT_BR_EDR) != if (get_btm_client_interface().peer.BTM_ReadRemoteDeviceName( p_dev_rec->bd_addr, NULL, BT_TRANSPORT_BR_EDR) != BTM_CMD_STARTED) { log::error("cannot read remote name"); btm_sec_cb.change_pairing_state(BTM_PAIR_STATE_IDLE); Loading Loading @@ -3727,8 +3729,8 @@ void btm_sec_connected(const RawAddress& bda, uint16_t handle, if (BTM_SEC_IS_SM4_UNKNOWN(p_dev_rec->sm4)) { /* Try again: RNR when no ACL causes HCI_RMT_HOST_SUP_FEAT_NOTIFY_EVT */ btm_sec_cb.change_pairing_state(BTM_PAIR_STATE_GET_REM_NAME); if (BTM_ReadRemoteDeviceName(bda, NULL, BT_TRANSPORT_BR_EDR) != BTM_CMD_STARTED) { if (get_btm_client_interface().peer.BTM_ReadRemoteDeviceName( bda, NULL, BT_TRANSPORT_BR_EDR) != BTM_CMD_STARTED) { log::error("cannot read remote name"); btm_sec_cb.change_pairing_state(BTM_PAIR_STATE_IDLE); } Loading
system/test/headless/read/name.cc +6 −5 Original line number Diff line number Diff line Loading @@ -20,9 +20,9 @@ #include <future> #include "os/log.h" // android log only #include "stack/include/btm_api.h" #include "stack/include/btm_api_types.h" #include "stack/btm/neighbor_inquiry.h" #include "stack/include/bt_name.h" #include "stack/include/btm_client_interface.h" #include "test/headless/get_options.h" #include "test/headless/headless.h" #include "types/raw_address.h" Loading Loading @@ -52,7 +52,8 @@ int bluetooth::test::headless::Name::Run() { auto future = promise_.get_future(); tBTM_STATUS status = BTM_ReadRemoteDeviceName( tBTM_STATUS status = get_btm_client_interface().peer.BTM_ReadRemoteDeviceName( raw_address, &RemoteNameCallback, BT_TRANSPORT_BR_EDR); if (status != BTM_CMD_STARTED) { fprintf(stdout, "Failure to start read remote device\n"); Loading