* Returns void
*
******************************************************************************/
-void btm_sco_connected(uint8_t hci_status, const RawAddress* bda,
+void btm_sco_connected(uint8_t hci_status, const RawAddress& bda,
uint16_t hci_handle, tBTM_ESCO_DATA* p_esco_data) {
tSCO_CONN* p = &btm_cb.sco_cb.sco_db[0];
uint16_t xx;
for (xx = 0; xx < BTM_MAX_SCO_LINKS; xx++, p++) {
if (((p->state == SCO_ST_CONNECTING) || (p->state == SCO_ST_LISTENING) ||
(p->state == SCO_ST_W4_CONN_RSP)) &&
- (p->rem_bd_known) && (!bda || p->esco.data.bd_addr == *bda)) {
+ (p->rem_bd_known) && (p->esco.data.bd_addr == bda)) {
if (hci_status != HCI_SUCCESS) {
/* Report the error if originator, otherwise remain in Listen mode */
if (p->is_orig) {
p->state = SCO_ST_CONNECTED;
p->hci_handle = hci_handle;
- RawAddress bd_addr(*bda);
-
if (hci_status == HCI_SUCCESS) {
- BTM_LogHistory(kBtmLogTag, bd_addr, "Connection success",
+ BTM_LogHistory(kBtmLogTag, bda, "Connection success",
base::StringPrintf("handle:0x%04x %s", hci_handle,
(spt) ? "listener" : "initiator"));
} else {
BTM_LogHistory(
- kBtmLogTag, bd_addr, "Connection failed",
+ kBtmLogTag, bda, "Connection failed",
base::StringPrintf(
"reason:%s",
hci_reason_code_text(static_cast<tHCI_REASON>(hci_status))
memset(&esco_data, 0, sizeof(tBTM_ESCO_DATA));
/* esco_data.link_type = HCI_LINK_TYPE_SCO; already zero */
esco_data.bd_addr = bda;
- btm_sco_connected(status, &bda, handle, &esco_data);
+ btm_sco_connected(status, bda, handle, &esco_data);
}
}
handle = HCID_GET_HANDLE(handle);
data.bd_addr = bda;
- btm_sco_connected(status, &bda, handle, &data);
+ btm_sco_connected(status, bda, handle, &data);
}
/*******************************************************************************
// Determine if initial connection failed or is a change of setup
if (btm_is_sco_active(handle)) {
btm_esco_proc_conn_chg(status, handle, 0, 0, 0, 0);
- } else {
- btm_sco_connected(status, nullptr, handle, nullptr);
}
}
break;
uint16_t hci_handle);
extern void btm_sco_conn_req(const RawAddress& bda, DEV_CLASS dev_class,
uint8_t link_type);
-extern void btm_sco_connected(uint8_t hci_status, const RawAddress* bda,
+extern void btm_sco_connected(uint8_t hci_status, const RawAddress& bda,
uint16_t hci_handle, tBTM_ESCO_DATA* p_esco_data);
extern bool btm_sco_removed(uint16_t hci_handle, tHCI_REASON reason);