Loading system/stack/smp/smp_api.cc +33 −28 Original line number Original line Diff line number Diff line Loading @@ -246,12 +246,15 @@ bool SMP_PairCancel(BD_ADDR bd_addr) { void SMP_SecurityGrant(BD_ADDR bd_addr, uint8_t res) { void SMP_SecurityGrant(BD_ADDR bd_addr, uint8_t res) { SMP_TRACE_EVENT("SMP_SecurityGrant "); SMP_TRACE_EVENT("SMP_SecurityGrant "); // If just showing consent dialog, send response if (smp_cb.cb_evt == SMP_CONSENT_REQ_EVT) { // If JUSTWORKS, this is used to display the consent dialog // If JUSTWORKS, this is used to display the consent dialog if (smp_cb.selected_association_model == SMP_MODEL_SEC_CONN_JUSTWORKS) { if (smp_cb.selected_association_model == SMP_MODEL_SEC_CONN_JUSTWORKS) { if (res == SMP_SUCCESS) { if (res == SMP_SUCCESS) { smp_sm_event(&smp_cb, SMP_SC_NC_OK_EVT, NULL); smp_sm_event(&smp_cb, SMP_SC_NC_OK_EVT, NULL); } else { } else { SMP_TRACE_WARNING("%s() - Consent dialog fails for JUSTWORKS", __func__); SMP_TRACE_WARNING("%s() - Consent dialog fails for JUSTWORKS", __func__); /* send pairing failure */ /* send pairing failure */ uint8_t failure = SMP_NUMERIC_COMPAR_FAIL; uint8_t failure = SMP_NUMERIC_COMPAR_FAIL; smp_sm_event(&smp_cb, SMP_AUTH_CMPL_EVT, &failure); smp_sm_event(&smp_cb, SMP_AUTH_CMPL_EVT, &failure); Loading @@ -276,6 +279,8 @@ void SMP_SecurityGrant(BD_ADDR bd_addr, uint8_t res) { smp_sm_event(&smp_cb, SMP_AUTH_CMPL_EVT, &failure); smp_sm_event(&smp_cb, SMP_AUTH_CMPL_EVT, &failure); } } } } return; } if (smp_cb.smp_over_br) { if (smp_cb.smp_over_br) { if (smp_cb.br_state != SMP_BR_STATE_WAIT_APP_RSP || if (smp_cb.br_state != SMP_BR_STATE_WAIT_APP_RSP || Loading Loading
system/stack/smp/smp_api.cc +33 −28 Original line number Original line Diff line number Diff line Loading @@ -246,12 +246,15 @@ bool SMP_PairCancel(BD_ADDR bd_addr) { void SMP_SecurityGrant(BD_ADDR bd_addr, uint8_t res) { void SMP_SecurityGrant(BD_ADDR bd_addr, uint8_t res) { SMP_TRACE_EVENT("SMP_SecurityGrant "); SMP_TRACE_EVENT("SMP_SecurityGrant "); // If just showing consent dialog, send response if (smp_cb.cb_evt == SMP_CONSENT_REQ_EVT) { // If JUSTWORKS, this is used to display the consent dialog // If JUSTWORKS, this is used to display the consent dialog if (smp_cb.selected_association_model == SMP_MODEL_SEC_CONN_JUSTWORKS) { if (smp_cb.selected_association_model == SMP_MODEL_SEC_CONN_JUSTWORKS) { if (res == SMP_SUCCESS) { if (res == SMP_SUCCESS) { smp_sm_event(&smp_cb, SMP_SC_NC_OK_EVT, NULL); smp_sm_event(&smp_cb, SMP_SC_NC_OK_EVT, NULL); } else { } else { SMP_TRACE_WARNING("%s() - Consent dialog fails for JUSTWORKS", __func__); SMP_TRACE_WARNING("%s() - Consent dialog fails for JUSTWORKS", __func__); /* send pairing failure */ /* send pairing failure */ uint8_t failure = SMP_NUMERIC_COMPAR_FAIL; uint8_t failure = SMP_NUMERIC_COMPAR_FAIL; smp_sm_event(&smp_cb, SMP_AUTH_CMPL_EVT, &failure); smp_sm_event(&smp_cb, SMP_AUTH_CMPL_EVT, &failure); Loading @@ -276,6 +279,8 @@ void SMP_SecurityGrant(BD_ADDR bd_addr, uint8_t res) { smp_sm_event(&smp_cb, SMP_AUTH_CMPL_EVT, &failure); smp_sm_event(&smp_cb, SMP_AUTH_CMPL_EVT, &failure); } } } } return; } if (smp_cb.smp_over_br) { if (smp_cb.smp_over_br) { if (smp_cb.br_state != SMP_BR_STATE_WAIT_APP_RSP || if (smp_cb.br_state != SMP_BR_STATE_WAIT_APP_RSP || Loading