Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cea3391b authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I0d5054b6,I4fc785a7 into main

* changes:
  [3/24] Canonical form tBTM_STATUS::BTM_BUSY
  [2/24] Canonical form tBTM_STATUS::BTM_BAD_VALUE_RET
parents 758055f8 a41a100d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -303,7 +303,7 @@ static bool bta_dm_read_remote_device_name(const RawAddress& bd_addr, tBT_TRANSP
    log::verbose("BTM_ReadRemoteDeviceName is started");

    return true;
  } else if (btm_status == BTM_BUSY) {
  } else if (btm_status == tBTM_STATUS::BTM_BUSY) {
    log::verbose("BTM_ReadRemoteDeviceName is busy");

    return true;
+2 −2
Original line number Diff line number Diff line
@@ -395,7 +395,7 @@ static bool bta_dm_read_remote_device_name(const RawAddress& bd_addr, tBT_TRANSP
    log::verbose("BTM_ReadRemoteDeviceName is started");

    return true;
  } else if (btm_status == BTM_BUSY) {
  } else if (btm_status == tBTM_STATUS::BTM_BUSY) {
    log::verbose("BTM_ReadRemoteDeviceName is busy");

    /* Remote name discovery is on going now so BTM cannot notify through
@@ -1388,7 +1388,7 @@ static void bta_dm_service_search_remname_cback(const RawAddress& bd_addr, DEV_C
    /* get name of device */
    btm_status = get_btm_client_interface().peer.BTM_ReadRemoteDeviceName(
            bta_dm_search_cb.peer_bdaddr, bta_dm_remname_cback, BT_TRANSPORT_BR_EDR);
    if (btm_status == BTM_BUSY) {
    if (btm_status == tBTM_STATUS::BTM_BUSY) {
      /* wait for next chance(notification of remote name discovery done) */
      log::verbose("BTM_ReadRemoteDeviceName is busy");
    } else if (btm_status != BTM_CMD_STARTED) {
+1 −1
Original line number Diff line number Diff line
@@ -811,7 +811,7 @@ void bta_dm_encrypt_cback(RawAddress bd_addr, tBT_TRANSPORT transport, void* /*
    case BTM_NO_RESOURCES:
      bta_status = BTA_NO_RESOURCES;
      break;
    case BTM_BUSY:
    case tBTM_STATUS::BTM_BUSY:
      bta_status = BTA_BUSY;
      break;
    default:
+1 −1
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ TEST_F(BtaDmTest, bta_dm_encrypt_cback) {
  device->p_encrypt_cback = BTA_DM_ENCRYPT_CBACK;
  bta_dm_encrypt_cback(kRawAddress, transport, nullptr, BTM_NO_RESOURCES);
  device->p_encrypt_cback = BTA_DM_ENCRYPT_CBACK;
  bta_dm_encrypt_cback(kRawAddress, transport, nullptr, BTM_BUSY);
  bta_dm_encrypt_cback(kRawAddress, transport, nullptr, tBTM_STATUS::BTM_BUSY);
  device->p_encrypt_cback = BTA_DM_ENCRYPT_CBACK;
  bta_dm_encrypt_cback(kRawAddress, transport, nullptr, BTM_ILLEGAL_VALUE);

+5 −5
Original line number Diff line number Diff line
@@ -533,7 +533,7 @@ tBTM_STATUS BTM_GetRole(const RawAddress& remote_bd_addr, tHCI_ROLE* p_role) {
 *                  BTM_UNKNOWN_ADDR if no active link with bd addr specified
 *                  BTM_MODE_UNSUPPORTED if local device does not support role
 *                                       switching
 *                  BTM_BUSY if the previous command is not completed
 *                  tBTM_STATUS::BTM_BUSY if the previous command is not completed
 *
 ******************************************************************************/
tBTM_STATUS BTM_SwitchRoleToCentral(const RawAddress& remote_bd_addr) {
@@ -565,7 +565,7 @@ tBTM_STATUS BTM_SwitchRoleToCentral(const RawAddress& remote_bd_addr) {

  if (!p_acl->is_switch_role_idle()) {
    log::info("Role switch is already progress");
    return BTM_BUSY;
    return tBTM_STATUS::BTM_BUSY;
  }

  if (interop_match_addr(INTEROP_DYNAMIC_ROLE_SWITCH, &remote_bd_addr)) {
@@ -1572,7 +1572,7 @@ tBTM_STATUS BTM_ReadRSSI(const RawAddress& remote_bda, tBTM_CMPL_CB* p_cb) {

  /* If someone already waiting on the version, do not allow another */
  if (btm_cb.devcb.p_rssi_cmpl_cb) {
    return BTM_BUSY;
    return tBTM_STATUS::BTM_BUSY;
  }

  get_btm_client_interface().peer.BTM_ReadDevInfo(remote_bda, &dev_type, &addr_type);
@@ -1618,7 +1618,7 @@ tBTM_STATUS BTM_ReadFailedContactCounter(const RawAddress& remote_bda, tBTM_CMPL

  /* If someone already waiting on the result, do not allow another */
  if (btm_cb.devcb.p_failed_contact_counter_cmpl_cb) {
    return BTM_BUSY;
    return tBTM_STATUS::BTM_BUSY;
  }

  get_btm_client_interface().peer.BTM_ReadDevInfo(remote_bda, &dev_type, &addr_type);
@@ -1663,7 +1663,7 @@ tBTM_STATUS BTM_ReadTxPower(const RawAddress& remote_bda, tBT_TRANSPORT transpor

  /* If someone already waiting on the version, do not allow another */
  if (btm_cb.devcb.p_tx_power_cmpl_cb) {
    return BTM_BUSY;
    return tBTM_STATUS::BTM_BUSY;
  }

  p = internal_.btm_bda_to_acl(remote_bda, transport);
Loading