diff options
author | 2024-07-05 12:44:35 -0700 | |
---|---|---|
committer | 2024-08-16 16:49:54 -0700 | |
commit | 84ef39b1f9ffccff30f9808c3ea5117d04566b88 (patch) | |
tree | dead7f86d96fa18e7c63696fbb4e10645c5a2d59 | |
parent | 2639470bcda9e255d867826ad1c804b62dea365b (diff) |
[18/24] Canonical form tBTM_STATUS::BTM_NO_RESOURCES
Prepare for class enum-ify tBTM_STATUS
Bug: 358402071
Test: m .
Flag: EXEMPT, Mechanical Refactor
Change-Id: I11a9939b86daa409f78401290c7cea19e81e6858
-rw-r--r-- | system/bta/dm/bta_dm_sec.cc | 2 | ||||
-rw-r--r-- | system/bta/test/bta_dm_test.cc | 2 | ||||
-rw-r--r-- | system/stack/acl/btm_acl.cc | 4 | ||||
-rw-r--r-- | system/stack/acl/btm_pm.cc | 6 | ||||
-rw-r--r-- | system/stack/btm/btm_ble_sec.cc | 2 | ||||
-rw-r--r-- | system/stack/btm/btm_devctl.cc | 10 | ||||
-rw-r--r-- | system/stack/btm/btm_inq.cc | 10 | ||||
-rw-r--r-- | system/stack/btm/btm_sco.cc | 12 | ||||
-rw-r--r-- | system/stack/btm/btm_sec.cc | 18 | ||||
-rw-r--r-- | system/stack/btm/power_mode.h | 2 | ||||
-rw-r--r-- | system/stack/include/acl_api.h | 8 | ||||
-rw-r--r-- | system/stack/include/btm_api.h | 10 | ||||
-rw-r--r-- | system/stack/include/btm_inq.h | 8 | ||||
-rw-r--r-- | system/stack/l2cap/l2c_ble.cc | 2 | ||||
-rw-r--r-- | system/stack/l2cap/l2c_link.cc | 2 |
15 files changed, 49 insertions, 49 deletions
diff --git a/system/bta/dm/bta_dm_sec.cc b/system/bta/dm/bta_dm_sec.cc index 1f6b150afe..3831aad79a 100644 --- a/system/bta/dm/bta_dm_sec.cc +++ b/system/bta/dm/bta_dm_sec.cc @@ -809,7 +809,7 @@ void bta_dm_encrypt_cback(RawAddress bd_addr, tBT_TRANSPORT transport, void* /* case BTM_WRONG_MODE: bta_status = BTA_WRONG_MODE; break; - case BTM_NO_RESOURCES: + case tBTM_STATUS::BTM_NO_RESOURCES: bta_status = BTA_NO_RESOURCES; break; case tBTM_STATUS::BTM_BUSY: diff --git a/system/bta/test/bta_dm_test.cc b/system/bta/test/bta_dm_test.cc index 80d8312140..e6c1833654 100644 --- a/system/bta/test/bta_dm_test.cc +++ b/system/bta/test/bta_dm_test.cc @@ -278,7 +278,7 @@ TEST_F(BtaDmTest, bta_dm_encrypt_cback) { device->p_encrypt_cback = BTA_DM_ENCRYPT_CBACK; bta_dm_encrypt_cback(kRawAddress, transport, nullptr, BTM_WRONG_MODE); device->p_encrypt_cback = BTA_DM_ENCRYPT_CBACK; - bta_dm_encrypt_cback(kRawAddress, transport, nullptr, BTM_NO_RESOURCES); + bta_dm_encrypt_cback(kRawAddress, transport, nullptr, tBTM_STATUS::BTM_NO_RESOURCES); device->p_encrypt_cback = BTA_DM_ENCRYPT_CBACK; bta_dm_encrypt_cback(kRawAddress, transport, nullptr, tBTM_STATUS::BTM_BUSY); device->p_encrypt_cback = BTA_DM_ENCRYPT_CBACK; diff --git a/system/stack/acl/btm_acl.cc b/system/stack/acl/btm_acl.cc index da269925f6..39b5333674 100644 --- a/system/stack/acl/btm_acl.cc +++ b/system/stack/acl/btm_acl.cc @@ -528,7 +528,7 @@ tBTM_STATUS BTM_GetRole(const RawAddress& remote_bd_addr, tHCI_ROLE* p_role) { * * Returns tBTM_STATUS::BTM_SUCCESS if already in specified role. * tBTM_STATUS::BTM_CMD_STARTED if command issued to controller. - * BTM_NO_RESOURCES if couldn't allocate memory to issue + * tBTM_STATUS::BTM_NO_RESOURCES if couldn't allocate memory to issue * command * BTM_UNKNOWN_ADDR if no active link with bd addr specified * tBTM_STATUS::BTM_MODE_UNSUPPORTED if local device does not support role @@ -560,7 +560,7 @@ tBTM_STATUS BTM_SwitchRoleToCentral(const RawAddress& remote_bd_addr) { if (get_btm_client_interface().sco.BTM_IsScoActiveByBdaddr(remote_bd_addr)) { log::info("An active SCO to device prevents role switch at this time"); - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } if (!p_acl->is_switch_role_idle()) { diff --git a/system/stack/acl/btm_pm.cc b/system/stack/acl/btm_pm.cc index 72e910b270..ada3725f35 100644 --- a/system/stack/acl/btm_pm.cc +++ b/system/stack/acl/btm_pm.cc @@ -121,7 +121,7 @@ static tBTM_STATUS btm_pm_snd_md_req(uint16_t handle, uint8_t pm_id, int link_in * Description register or deregister with power manager * * Returns tBTM_STATUS::BTM_SUCCESS if successful, - * BTM_NO_RESOURCES if no room to hold registration + * tBTM_STATUS::BTM_NO_RESOURCES if no room to hold registration * tBTM_STATUS::BTM_ILLEGAL_VALUE * ******************************************************************************/ @@ -146,7 +146,7 @@ tBTM_STATUS BTM_PmRegister(uint8_t mask, uint8_t* p_pm_id, tBTM_PM_STATUS_CBACK* return tBTM_STATUS::BTM_SUCCESS; } - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } void BTM_PM_OnConnected(uint16_t handle, const RawAddress& remote_bda) { @@ -597,7 +597,7 @@ static tBTM_STATUS btm_pm_snd_md_req(uint16_t handle, uint8_t pm_id, int link_in if (pm_pend_link == 0) { /* the command was not sent */ log::error("pm_pending_link maxed out"); - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } return tBTM_STATUS::BTM_CMD_STARTED; diff --git a/system/stack/btm/btm_ble_sec.cc b/system/stack/btm/btm_ble_sec.cc index 309572e06c..2bfab90853 100644 --- a/system/stack/btm/btm_ble_sec.cc +++ b/system/stack/btm/btm_ble_sec.cc @@ -1114,7 +1114,7 @@ void btm_ble_link_sec_check(const RawAddress& bd_addr, tBTM_LE_AUTH_REQ auth_req ******************************************************************************/ tBTM_STATUS btm_ble_set_encryption(const RawAddress& bd_addr, tBTM_BLE_SEC_ACT sec_act, uint8_t link_role) { - tBTM_STATUS cmd = BTM_NO_RESOURCES; + tBTM_STATUS cmd = tBTM_STATUS::BTM_NO_RESOURCES; tBTM_SEC_DEV_REC* p_rec = btm_find_dev(bd_addr); tBTM_BLE_SEC_REQ_ACT sec_req_act; tBTM_LE_AUTH_REQ auth_req; diff --git a/system/stack/btm/btm_devctl.cc b/system/stack/btm/btm_devctl.cc index 4564c8d96d..4f2fe4ac6f 100644 --- a/system/stack/btm/btm_devctl.cc +++ b/system/stack/btm/btm_devctl.cc @@ -352,7 +352,7 @@ tBTM_STATUS BTM_SetLocalDeviceName(const char* p_name) { * Returns status of the operation * If success, tBTM_STATUS::BTM_SUCCESS is returned and p_name points stored * local device name - * If BTM doesn't store local device name, BTM_NO_RESOURCES is + * If BTM doesn't store local device name, tBTM_STATUS::BTM_NO_RESOURCES is * is returned and p_name is set to NULL * ******************************************************************************/ @@ -374,7 +374,7 @@ tBTM_STATUS BTM_ReadLocalDeviceName(const char** p_name) { tBTM_STATUS BTM_ReadLocalDeviceNameFromController(tBTM_CMPL_CB* p_rln_cmpl_cback) { /* Check if rln already in progress */ if (btm_cb.devcb.p_rln_cmpl_cb) { - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } /* Save callback */ @@ -511,7 +511,7 @@ void BTM_WriteVoiceSettings(uint16_t settings) { * * Returns * tBTM_STATUS::BTM_SUCCESS Command sent. - * BTM_NO_RESOURCES If out of resources to send the command. + * tBTM_STATUS::BTM_NO_RESOURCES If out of resources to send the command. * * ******************************************************************************/ @@ -528,12 +528,12 @@ tBTM_STATUS BTM_EnableTestMode(void) { /* put device to connectable mode */ if (BTM_SetConnectability(BTM_CONNECTABLE) != tBTM_STATUS::BTM_SUCCESS) { - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } /* put device to discoverable mode */ if (BTM_SetDiscoverability(BTM_GENERAL_DISCOVERABLE) != tBTM_STATUS::BTM_SUCCESS) { - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } /* mask off all of event from controller */ diff --git a/system/stack/btm/btm_inq.cc b/system/stack/btm/btm_inq.cc index 0aaf8ed566..b7531b5036 100644 --- a/system/stack/btm/btm_inq.cc +++ b/system/stack/btm/btm_inq.cc @@ -259,7 +259,7 @@ static bool is_inquery_by_rssi() { return osi_property_get_bool(PROPERTY_INQ_BY_ * * Returns tBTM_STATUS::BTM_SUCCESS if successful * tBTM_STATUS::BTM_BUSY if a setting of the filter is already in progress - * BTM_NO_RESOURCES if couldn't get a memory pool buffer + * tBTM_STATUS::BTM_NO_RESOURCES if couldn't get a memory pool buffer * tBTM_STATUS::BTM_ILLEGAL_VALUE if a bad parameter was detected * BTM_WRONG_MODE if the device is not up. * @@ -402,7 +402,7 @@ void BTM_EnableInterlacedPageScan() { * Output Params: mode - standard, with RSSI, extended * * Returns tBTM_STATUS::BTM_SUCCESS if successful - * BTM_NO_RESOURCES if couldn't get a memory pool buffer + * tBTM_STATUS::BTM_NO_RESOURCES if couldn't get a memory pool buffer * tBTM_STATUS::BTM_ILLEGAL_VALUE if a bad parameter was detected * BTM_WRONG_MODE if the device is not up. * @@ -442,7 +442,7 @@ tBTM_STATUS BTM_SetInquiryMode(uint8_t mode) { * * Returns tBTM_STATUS::BTM_SUCCESS if successful * tBTM_STATUS::BTM_ILLEGAL_VALUE if a bad parameter is detected - * BTM_NO_RESOURCES if could not allocate a message buffer + * tBTM_STATUS::BTM_NO_RESOURCES if could not allocate a message buffer * BTM_WRONG_MODE if the device is not up. * ******************************************************************************/ @@ -451,7 +451,7 @@ tBTM_STATUS BTM_SetConnectability(uint16_t page_mode) { if (bluetooth::shim::GetController()->SupportsBle()) { if (btm_ble_set_connectability(page_mode) != tBTM_STATUS::BTM_SUCCESS) { - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } btm_cb.btm_inq_vars.connectable_mode &= (~BTM_BLE_CONNECTABLE_MASK); btm_cb.btm_inq_vars.connectable_mode |= (page_mode & BTM_BLE_CONNECTABLE_MASK); @@ -660,7 +660,7 @@ static tBTM_STATUS BTM_StartLeScan() { * tBTM_STATUS::BTM_CMD_STARTED if successfully initiated * tBTM_STATUS::BTM_BUSY if already in progress * tBTM_STATUS::BTM_ILLEGAL_VALUE if parameter(s) are out of range - * BTM_NO_RESOURCES if could not allocate resources to start + * tBTM_STATUS::BTM_NO_RESOURCES if could not allocate resources to start * the command * BTM_WRONG_MODE if the device is not up. * diff --git a/system/stack/btm/btm_sco.cc b/system/stack/btm/btm_sco.cc index 9d67123574..5254e46940 100644 --- a/system/stack/btm/btm_sco.cc +++ b/system/stack/btm/btm_sco.cc @@ -686,7 +686,7 @@ static tBTM_STATUS btm_send_connect_request(uint16_t acl_handle, enh_esco_params * Returns BTM_UNKNOWN_ADDR if the ACL connection is not up * tBTM_STATUS::BTM_BUSY if another SCO being set up to * the same BD address - * BTM_NO_RESOURCES if the max SCO limit has been reached + * tBTM_STATUS::BTM_NO_RESOURCES if the max SCO limit has been reached * tBTM_STATUS::BTM_CMD_STARTED if the connection establishment is started. * In this case, "*p_sco_inx" is filled in * with the sco index used for the connection. @@ -701,7 +701,7 @@ tBTM_STATUS BTM_CreateSco(const RawAddress* remote_bda, bool is_orig, uint16_t p *p_sco_inx = BTM_INVALID_SCO_INDEX; if (BTM_MAX_SCO_LINKS == 0) { - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } /* If originating, ensure that there is an ACL connection to the BD Address */ @@ -800,7 +800,7 @@ tBTM_STATUS BTM_CreateSco(const RawAddress* remote_bda, bool is_orig, uint16_t p if ((btm_send_connect_request(acl_handle, p_setup)) != tBTM_STATUS::BTM_CMD_STARTED) { log::error("failed to send connect request for {}", *remote_bda); - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } p->state = SCO_ST_CONNECTING; @@ -822,7 +822,7 @@ tBTM_STATUS BTM_CreateSco(const RawAddress* remote_bda, bool is_orig, uint16_t p /* If here, all SCO blocks in use */ log::error("all SCO control blocks are in use"); - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } /******************************************************************************* @@ -1144,7 +1144,7 @@ tBTM_STATUS BTM_RemoveSco(uint16_t sco_inx) { log::verbose(""); if (BTM_MAX_SCO_LINKS == 0) { - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } /* Validity check */ @@ -1434,7 +1434,7 @@ tBTM_STATUS BTM_RegForEScoEvts(uint16_t sco_inx, tBTM_ESCO_CBACK* p_esco_cback) * a change packet type request is sent out instead. * * Returns tBTM_STATUS::BTM_CMD_STARTED if command is successfully initiated. - * BTM_NO_RESOURCES - not enough resources to initiate command. + * tBTM_STATUS::BTM_NO_RESOURCES - not enough resources to initiate command. * BTM_WRONG_MODE if no connection with a peer device or bad * sco_inx. * diff --git a/system/stack/btm/btm_sec.cc b/system/stack/btm/btm_sec.cc index 8118c6cb36..d5ca8b3bbf 100644 --- a/system/stack/btm/btm_sec.cc +++ b/system/stack/btm/btm_sec.cc @@ -667,12 +667,12 @@ tBTM_STATUS btm_sec_bond_by_transport(const RawAddress& bd_addr, tBLE_ADDR_TYPE p_dev_rec = btm_find_or_alloc_dev(bd_addr); if (p_dev_rec == NULL) { log::error("No memory to allocate new p_dev_rec"); - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } if (bluetooth::shim::GetController() == nullptr) { log::error("controller module is not ready"); - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } log::verbose("before update sec_flags=0x{:x}", p_dev_rec->sec_rec.sec_flags); @@ -689,7 +689,7 @@ tBTM_STATUS btm_sec_bond_by_transport(const RawAddress& bd_addr, tBLE_ADDR_TYPE /* Tell controller to get rid of the link key if it has one stored */ if ((BTM_DeleteStoredLinkKey(&bd_addr, NULL)) != tBTM_STATUS::BTM_SUCCESS) { log::error("Failed to delete stored link keys"); - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } btm_sec_cb.pairing_bda = bd_addr; @@ -713,7 +713,7 @@ tBTM_STATUS btm_sec_bond_by_transport(const RawAddress& bd_addr, tBLE_ADDR_TYPE } btm_sec_cb.pairing_flags = 0; - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } p_dev_rec->sec_rec.sec_flags &= @@ -2053,7 +2053,7 @@ void btm_sec_abort_access_req(const RawAddress& bd_addr) { * * Returns tBTM_STATUS::BTM_SUCCESS if an ACL connection is already up * tBTM_STATUS::BTM_CMD_STARTED if the ACL connection has been requested - * BTM_NO_RESOURCES if failed to start the ACL connection + * tBTM_STATUS::BTM_NO_RESOURCES if failed to start the ACL connection * ******************************************************************************/ static tBTM_STATUS btm_sec_dd_create_conn(tBTM_SEC_DEV_REC* p_dev_rec) { @@ -2066,8 +2066,8 @@ static tBTM_STATUS btm_sec_dd_create_conn(tBTM_SEC_DEV_REC* p_dev_rec) { return tBTM_STATUS::BTM_SUCCESS; } return tBTM_STATUS::BTM_CMD_STARTED; - } else if (status == BTM_NO_RESOURCES) { - return BTM_NO_RESOURCES; + } else if (status == tBTM_STATUS::BTM_NO_RESOURCES) { + return tBTM_STATUS::BTM_NO_RESOURCES; } /* set up the control block to indicated dedicated bonding */ @@ -4402,7 +4402,7 @@ void btm_sec_update_clock_offset(uint16_t handle, uint16_t clock_offset) { * * Returns tBTM_STATUS::BTM_SUCCESS - permission is granted * tBTM_STATUS::BTM_CMD_STARTED - in process - * BTM_NO_RESOURCES - permission declined + * tBTM_STATUS::BTM_NO_RESOURCES - permission declined * ******************************************************************************/ tBTM_STATUS btm_sec_execute_procedure(tBTM_SEC_DEV_REC* p_dev_rec) { @@ -4423,7 +4423,7 @@ tBTM_STATUS btm_sec_execute_procedure(tBTM_SEC_DEV_REC* p_dev_rec) { log::debug("Security Manager: Start get name"); if (!btm_sec_start_get_name(p_dev_rec)) { log::warn("Unable to start remote name request"); - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } return tBTM_STATUS::BTM_CMD_STARTED; } diff --git a/system/stack/btm/power_mode.h b/system/stack/btm/power_mode.h index 440fb0135b..a7ef4fd6a3 100644 --- a/system/stack/btm/power_mode.h +++ b/system/stack/btm/power_mode.h @@ -210,7 +210,7 @@ inline void set_le_scan_mode_to_ctrl_state(uint32_t duty_cycle, tBTM_CONTRL_STAT * Description register or deregister with power manager * * Returns tBTM_STATUS::BTM_SUCCESS if successful, - * BTM_NO_RESOURCES if no room to hold registration + * tBTM_STATUS::BTM_NO_RESOURCES if no room to hold registration * tBTM_STATUS::BTM_ILLEGAL_VALUE * ******************************************************************************/ diff --git a/system/stack/include/acl_api.h b/system/stack/include/acl_api.h index 11b935c411..7f9084a964 100644 --- a/system/stack/include/acl_api.h +++ b/system/stack/include/acl_api.h @@ -103,7 +103,7 @@ tBTM_STATUS BTM_GetRole(const RawAddress& remote_bd_addr, tHCI_ROLE* p_role); * * Returns tBTM_STATUS::BTM_SUCCESS if already in specified role. * tBTM_STATUS::BTM_CMD_STARTED if command issued to controller. - * BTM_NO_RESOURCES if memory couldn't be allocated to issue + * tBTM_STATUS::BTM_NO_RESOURCES if memory couldn't be allocated to issue * the command * BTM_UNKNOWN_ADDR if no active link with bd addr specified * tBTM_STATUS::BTM_MODE_UNSUPPORTED if the local device does not support @@ -121,7 +121,7 @@ tBTM_STATUS BTM_SwitchRoleToCentral(const RawAddress& remote_bd_addr); * callback. (tBTM_RSSI_RESULT) * * Returns tBTM_STATUS::BTM_CMD_STARTED if command issued to controller. - * BTM_NO_RESOURCES if memory couldn't be allocated to issue + * tBTM_STATUS::BTM_NO_RESOURCES if memory couldn't be allocated to issue * the command * BTM_UNKNOWN_ADDR if no active link with bd addr specified * tBTM_STATUS::BTM_BUSY if command is already in progress @@ -139,7 +139,7 @@ tBTM_STATUS BTM_ReadRSSI(const RawAddress& remote_bda, tBTM_CMPL_CB* p_cb); * (tBTM_FAILED_CONTACT_COUNTER_RESULT) * * Returns tBTM_STATUS::BTM_CMD_STARTED if command issued to controller. - * BTM_NO_RESOURCES if memory couldn't be allocated to issue + * tBTM_STATUS::BTM_NO_RESOURCES if memory couldn't be allocated to issue * the command * BTM_UNKNOWN_ADDR if no active link with bd addr specified * tBTM_STATUS::BTM_BUSY if command is already in progress @@ -158,7 +158,7 @@ tBTM_STATUS BTM_ReadFailedContactCounter(const RawAddress& remote_bda, tBTM_CMPL * (tBTM_RSSI_RESULT) * * Returns tBTM_STATUS::BTM_CMD_STARTED if command issued to controller. - * BTM_NO_RESOURCES if memory couldn't be allocated to issue + * tBTM_STATUS::BTM_NO_RESOURCES if memory couldn't be allocated to issue * the command * BTM_UNKNOWN_ADDR if no active link with bd addr specified * tBTM_STATUS::BTM_BUSY if command is already in progress diff --git a/system/stack/include/btm_api.h b/system/stack/include/btm_api.h index 042e997732..504f009f30 100644 --- a/system/stack/include/btm_api.h +++ b/system/stack/include/btm_api.h @@ -93,7 +93,7 @@ void BTM_reset_complete(); * Returns status of the operation * If success, tBTM_STATUS::BTM_SUCCESS is returned and p_name points stored * local device name - * If BTM doesn't store local device name, BTM_NO_RESOURCES is + * If BTM doesn't store local device name, tBTM_STATUS::BTM_NO_RESOURCES is * is returned and p_name is set to NULL * ******************************************************************************/ @@ -162,7 +162,7 @@ void BTM_WriteVoiceSettings(uint16_t settings); * * Returns * tBTM_STATUS::BTM_SUCCESS Command sent. - * BTM_NO_RESOURCES If out of resources to send the command. + * tBTM_STATUS::BTM_NO_RESOURCES If out of resources to send the command. * * ******************************************************************************/ @@ -187,7 +187,7 @@ void BTM_WriteVoiceSettings(uint16_t settings); * sent to HCI. * tBTM_STATUS::BTM_BUSY if already in progress * BTM_UNKNOWN_ADDR if device address is bad - * BTM_NO_RESOURCES if resources could not be allocated to + * tBTM_STATUS::BTM_NO_RESOURCES if resources could not be allocated to * start the command * BTM_WRONG_MODE if the device is not up. * @@ -208,7 +208,7 @@ void BTM_WriteVoiceSettings(uint16_t settings); * Returns * tBTM_STATUS::BTM_CMD_STARTED is returned if the request was successfully * sent to HCI. - * BTM_NO_RESOURCES if resources could not be allocated to + * tBTM_STATUS::BTM_NO_RESOURCES if resources could not be allocated to * start the command * BTM_WRONG_MODE if there is no active remote name request. * @@ -322,7 +322,7 @@ void BTM_WriteVoiceSettings(uint16_t settings); * Returns BTM_UNKNOWN_ADDR if the ACL connection is not up * tBTM_STATUS::BTM_BUSY if another SCO being set up to * the same BD address - * BTM_NO_RESOURCES if the max SCO limit has been reached + * tBTM_STATUS::BTM_NO_RESOURCES if the max SCO limit has been reached * tBTM_STATUS::BTM_CMD_STARTED if the connection establishment is started. * In this case, "*p_sco_inx" is filled in * with the sco index used for the connection. diff --git a/system/stack/include/btm_inq.h b/system/stack/include/btm_inq.h index 92d97c6666..2d1ab3cc1a 100644 --- a/system/stack/include/btm_inq.h +++ b/system/stack/include/btm_inq.h @@ -33,7 +33,7 @@ * * Returns tBTM_STATUS::BTM_SUCCESS if successful * tBTM_STATUS::BTM_BUSY if a setting of the filter is already in progress - * BTM_NO_RESOURCES if couldn't get a memory pool buffer + * tBTM_STATUS::BTM_NO_RESOURCES if couldn't get a memory pool buffer * tBTM_STATUS::BTM_ILLEGAL_VALUE if a bad parameter was detected * BTM_WRONG_MODE if the device is not up. * @@ -69,7 +69,7 @@ * tBTM_STATUS::BTM_CMD_STARTED if successfully initiated * tBTM_STATUS::BTM_BUSY if already in progress * tBTM_STATUS::BTM_ILLEGAL_VALUE if parameter(s) are out of range - * BTM_NO_RESOURCES if could not allocate resources to start + * tBTM_STATUS::BTM_NO_RESOURCES if could not allocate resources to start * the command * BTM_WRONG_MODE if the device is not up. * @@ -107,7 +107,7 @@ void BTM_CancelInquiry(void); * * Returns tBTM_STATUS::BTM_SUCCESS if successful * tBTM_STATUS::BTM_ILLEGAL_VALUE if a bad parameter is detected - * BTM_NO_RESOURCES if could not allocate a message buffer + * tBTM_STATUS::BTM_NO_RESOURCES if could not allocate a message buffer * BTM_WRONG_MODE if the device is not up. * ******************************************************************************/ @@ -124,7 +124,7 @@ void BTM_CancelInquiry(void); * BTM_INQ_RESULT_EXTENDED * * Returns tBTM_STATUS::BTM_SUCCESS if successful - * BTM_NO_RESOURCES if couldn't get a memory pool buffer + * tBTM_STATUS::BTM_NO_RESOURCES if couldn't get a memory pool buffer * tBTM_STATUS::BTM_ILLEGAL_VALUE if a bad parameter was detected * BTM_WRONG_MODE if the device is not up. * diff --git a/system/stack/l2cap/l2c_ble.cc b/system/stack/l2cap/l2c_ble.cc index 2822e20673..5a4e867ad1 100644 --- a/system/stack/l2cap/l2c_ble.cc +++ b/system/stack/l2cap/l2c_ble.cc @@ -1331,7 +1331,7 @@ tL2CAP_LE_RESULT_CODE l2ble_sec_access_req(const RawAddress& bd_addr, uint16_t p tL2CAP_SEC_DATA* p_buf = (tL2CAP_SEC_DATA*)osi_malloc((uint16_t)sizeof(tL2CAP_SEC_DATA)); if (!p_buf) { log::error("No resources for connection"); - p_callback(bd_addr, BT_TRANSPORT_LE, p_ref_data, BTM_NO_RESOURCES); + p_callback(bd_addr, BT_TRANSPORT_LE, p_ref_data, tBTM_STATUS::BTM_NO_RESOURCES); return L2CAP_LE_RESULT_NO_RESOURCES; } diff --git a/system/stack/l2cap/l2c_link.cc b/system/stack/l2cap/l2c_link.cc index 4273ed34f5..2cf6602165 100644 --- a/system/stack/l2cap/l2c_link.cc +++ b/system/stack/l2cap/l2c_link.cc @@ -1194,7 +1194,7 @@ tBTM_STATUS l2cu_ConnectAclForSecurity(const RawAddress& bd_addr) { /* Make sure an L2cap link control block is available */ if (!p_lcb && (p_lcb = l2cu_allocate_lcb(bd_addr, true, BT_TRANSPORT_BR_EDR)) == NULL) { log::warn("failed allocate LCB for {}", bd_addr); - return BTM_NO_RESOURCES; + return tBTM_STATUS::BTM_NO_RESOURCES; } l2cu_create_conn_br_edr(p_lcb); |