Loading system/bta/dm/bta_dm_act.cc +0 −5 Original line number Diff line number Diff line Loading @@ -2559,11 +2559,6 @@ static uint8_t bta_dm_sp_cback(tBTM_SP_EVT event, tBTM_SP_EVT_DATA* p_data) { bta_dm_co_rmt_oob(p_data->rmt_oob.bd_addr); break; case BTM_SP_COMPLT_EVT: /* do not report this event - handled by link_key_callback or * auth_complete_callback */ break; default: status = BTM_NOT_AUTHORIZED; break; Loading system/stack/btm/btm_sec.cc +5 −16 Original line number Diff line number Diff line Loading @@ -3211,17 +3211,17 @@ void btm_proc_sp_req_evt(tBTM_SP_EVT event, uint8_t* p) { * ******************************************************************************/ void btm_simple_pair_complete(uint8_t* p) { tBTM_SP_COMPLT evt_data; RawAddress bd_addr; tBTM_SEC_DEV_REC* p_dev_rec; uint8_t status; bool disc = false; status = *p++; STREAM_TO_BDADDR(evt_data.bd_addr, p); STREAM_TO_BDADDR(bd_addr, p); p_dev_rec = btm_find_dev(evt_data.bd_addr); p_dev_rec = btm_find_dev(bd_addr); if (p_dev_rec == NULL) { LOG(ERROR) << __func__ << " with unknown BDA: " << evt_data.bd_addr; LOG(ERROR) << __func__ << " with unknown BDA: " << bd_addr; return; } Loading @@ -3229,9 +3229,7 @@ void btm_simple_pair_complete(uint8_t* p) { "btm_simple_pair_complete() Pair State: %s Status:%d sec_state: %u", btm_pair_state_descr(btm_cb.pairing_state), status, p_dev_rec->sec_state); evt_data.status = BTM_ERR_PROCESSING; if (status == HCI_SUCCESS) { evt_data.status = BTM_SUCCESS; p_dev_rec->sec_flags |= BTM_SEC_AUTHENTICATED; } else { if (status == HCI_ERR_PAIRING_NOT_ALLOWED) { Loading @@ -3241,7 +3239,7 @@ void btm_simple_pair_complete(uint8_t* p) { /* Change the timer to 1 second */ alarm_set_on_mloop(btm_cb.pairing_timer, BT_1SEC_TIMEOUT_MS, btm_sec_pairing_timeout, NULL); } else if (btm_cb.pairing_bda == evt_data.bd_addr) { } else if (btm_cb.pairing_bda == bd_addr) { /* stop the timer */ alarm_cancel(btm_cb.pairing_timer); Loading @@ -3254,15 +3252,6 @@ void btm_simple_pair_complete(uint8_t* p) { disc = true; } /* Let the pairing state stay active, p_auth_complete_callback will report the * failure */ evt_data.bd_addr = p_dev_rec->bd_addr; memcpy(evt_data.dev_class, p_dev_rec->dev_class, DEV_CLASS_LEN); if (btm_cb.api.p_sp_callback) (*btm_cb.api.p_sp_callback)(BTM_SP_COMPLT_EVT, (tBTM_SP_EVT_DATA*)&evt_data); if (disc) { /* simple pairing failed */ /* Avoid sending disconnect on HCI_ERR_PEER_USER */ Loading system/stack/include/btm_api_types.h +0 −10 Original line number Diff line number Diff line Loading @@ -871,7 +871,6 @@ enum { BTM_SP_KEY_REQ_EVT, /* received USER_PASSKEY_REQUEST event */ BTM_SP_LOC_OOB_EVT, /* received result for READ_LOCAL_OOB_DATA command */ BTM_SP_RMT_OOB_EVT, /* received REMOTE_OOB_DATA_REQUEST event */ BTM_SP_COMPLT_EVT, /* received SIMPLE_PAIRING_COMPLETE event */ }; typedef uint8_t tBTM_SP_EVT; Loading Loading @@ -981,14 +980,6 @@ typedef struct { tBTM_BD_NAME bd_name; /* peer device name */ } tBTM_SP_RMT_OOB; /* data type for BTM_SP_COMPLT_EVT */ typedef struct { RawAddress bd_addr; /* peer address */ DEV_CLASS dev_class; /* peer CoD */ tBTM_BD_NAME bd_name; /* peer device name */ tBTM_STATUS status; /* status of the simple pairing process */ } tBTM_SP_COMPLT; typedef union { tBTM_SP_IO_REQ io_req; /* BTM_SP_IO_REQ_EVT */ tBTM_SP_IO_RSP io_rsp; /* BTM_SP_IO_RSP_EVT */ Loading @@ -997,7 +988,6 @@ typedef union { tBTM_SP_KEY_REQ key_req; /* BTM_SP_KEY_REQ_EVT */ tBTM_SP_LOC_OOB loc_oob; /* BTM_SP_LOC_OOB_EVT */ tBTM_SP_RMT_OOB rmt_oob; /* BTM_SP_RMT_OOB_EVT */ tBTM_SP_COMPLT complt; /* BTM_SP_COMPLT_EVT */ } tBTM_SP_EVT_DATA; /* Simple Pairing Events. Called by the stack when Simple Pairing related Loading Loading
system/bta/dm/bta_dm_act.cc +0 −5 Original line number Diff line number Diff line Loading @@ -2559,11 +2559,6 @@ static uint8_t bta_dm_sp_cback(tBTM_SP_EVT event, tBTM_SP_EVT_DATA* p_data) { bta_dm_co_rmt_oob(p_data->rmt_oob.bd_addr); break; case BTM_SP_COMPLT_EVT: /* do not report this event - handled by link_key_callback or * auth_complete_callback */ break; default: status = BTM_NOT_AUTHORIZED; break; Loading
system/stack/btm/btm_sec.cc +5 −16 Original line number Diff line number Diff line Loading @@ -3211,17 +3211,17 @@ void btm_proc_sp_req_evt(tBTM_SP_EVT event, uint8_t* p) { * ******************************************************************************/ void btm_simple_pair_complete(uint8_t* p) { tBTM_SP_COMPLT evt_data; RawAddress bd_addr; tBTM_SEC_DEV_REC* p_dev_rec; uint8_t status; bool disc = false; status = *p++; STREAM_TO_BDADDR(evt_data.bd_addr, p); STREAM_TO_BDADDR(bd_addr, p); p_dev_rec = btm_find_dev(evt_data.bd_addr); p_dev_rec = btm_find_dev(bd_addr); if (p_dev_rec == NULL) { LOG(ERROR) << __func__ << " with unknown BDA: " << evt_data.bd_addr; LOG(ERROR) << __func__ << " with unknown BDA: " << bd_addr; return; } Loading @@ -3229,9 +3229,7 @@ void btm_simple_pair_complete(uint8_t* p) { "btm_simple_pair_complete() Pair State: %s Status:%d sec_state: %u", btm_pair_state_descr(btm_cb.pairing_state), status, p_dev_rec->sec_state); evt_data.status = BTM_ERR_PROCESSING; if (status == HCI_SUCCESS) { evt_data.status = BTM_SUCCESS; p_dev_rec->sec_flags |= BTM_SEC_AUTHENTICATED; } else { if (status == HCI_ERR_PAIRING_NOT_ALLOWED) { Loading @@ -3241,7 +3239,7 @@ void btm_simple_pair_complete(uint8_t* p) { /* Change the timer to 1 second */ alarm_set_on_mloop(btm_cb.pairing_timer, BT_1SEC_TIMEOUT_MS, btm_sec_pairing_timeout, NULL); } else if (btm_cb.pairing_bda == evt_data.bd_addr) { } else if (btm_cb.pairing_bda == bd_addr) { /* stop the timer */ alarm_cancel(btm_cb.pairing_timer); Loading @@ -3254,15 +3252,6 @@ void btm_simple_pair_complete(uint8_t* p) { disc = true; } /* Let the pairing state stay active, p_auth_complete_callback will report the * failure */ evt_data.bd_addr = p_dev_rec->bd_addr; memcpy(evt_data.dev_class, p_dev_rec->dev_class, DEV_CLASS_LEN); if (btm_cb.api.p_sp_callback) (*btm_cb.api.p_sp_callback)(BTM_SP_COMPLT_EVT, (tBTM_SP_EVT_DATA*)&evt_data); if (disc) { /* simple pairing failed */ /* Avoid sending disconnect on HCI_ERR_PEER_USER */ Loading
system/stack/include/btm_api_types.h +0 −10 Original line number Diff line number Diff line Loading @@ -871,7 +871,6 @@ enum { BTM_SP_KEY_REQ_EVT, /* received USER_PASSKEY_REQUEST event */ BTM_SP_LOC_OOB_EVT, /* received result for READ_LOCAL_OOB_DATA command */ BTM_SP_RMT_OOB_EVT, /* received REMOTE_OOB_DATA_REQUEST event */ BTM_SP_COMPLT_EVT, /* received SIMPLE_PAIRING_COMPLETE event */ }; typedef uint8_t tBTM_SP_EVT; Loading Loading @@ -981,14 +980,6 @@ typedef struct { tBTM_BD_NAME bd_name; /* peer device name */ } tBTM_SP_RMT_OOB; /* data type for BTM_SP_COMPLT_EVT */ typedef struct { RawAddress bd_addr; /* peer address */ DEV_CLASS dev_class; /* peer CoD */ tBTM_BD_NAME bd_name; /* peer device name */ tBTM_STATUS status; /* status of the simple pairing process */ } tBTM_SP_COMPLT; typedef union { tBTM_SP_IO_REQ io_req; /* BTM_SP_IO_REQ_EVT */ tBTM_SP_IO_RSP io_rsp; /* BTM_SP_IO_RSP_EVT */ Loading @@ -997,7 +988,6 @@ typedef union { tBTM_SP_KEY_REQ key_req; /* BTM_SP_KEY_REQ_EVT */ tBTM_SP_LOC_OOB loc_oob; /* BTM_SP_LOC_OOB_EVT */ tBTM_SP_RMT_OOB rmt_oob; /* BTM_SP_RMT_OOB_EVT */ tBTM_SP_COMPLT complt; /* BTM_SP_COMPLT_EVT */ } tBTM_SP_EVT_DATA; /* Simple Pairing Events. Called by the stack when Simple Pairing related Loading