Skip to content

Commit bdf1452

Browse files
joerchannashif
authored andcommitted
Bluetooth: host: Rename auth_err_get to security_err_get
Rename auth_err_get to security_err_get which better reflect the error namespace it converts to. Also update to using the enum definition instead of uint8_t for local variable holding returned value. Signed-off-by: Joakim Andersson <[email protected]>
1 parent 746c65a commit bdf1452

File tree

1 file changed

+5
-5
lines changed
  • subsys/bluetooth/host

1 file changed

+5
-5
lines changed

subsys/bluetooth/host/smp.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ static uint8_t get_pair_method(struct bt_smp *smp, uint8_t remote_io)
411411
#endif
412412
}
413413

414-
static enum bt_security_err auth_err_get(uint8_t smp_err)
414+
static enum bt_security_err security_err_get(uint8_t smp_err)
415415
{
416416
switch (smp_err) {
417417
case BT_SMP_ERR_PASSKEY_ENTRY_FAILED:
@@ -1003,7 +1003,7 @@ static void smp_pairing_br_complete(struct bt_smp_br *smp, uint8_t status)
10031003

10041004
if (bt_auth && bt_auth->pairing_failed) {
10051005
bt_auth->pairing_failed(smp->chan.chan.conn,
1006-
auth_err_get(status));
1006+
security_err_get(status));
10071007
}
10081008
} else {
10091009
bool bond_flag = atomic_test_bit(smp->flags, SMP_FLAG_BOND);
@@ -1838,7 +1838,7 @@ static void smp_pairing_complete(struct bt_smp *smp, uint8_t status)
18381838
bt_auth->pairing_complete(conn, bond_flag);
18391839
}
18401840
} else {
1841-
uint8_t auth_err = auth_err_get(status);
1841+
enum bt_security_err security_err = security_err_get(status);
18421842

18431843
/* Clear the key pool entry in case of pairing failure if the
18441844
* keys already existed before the pairing procedure or the
@@ -1852,11 +1852,11 @@ static void smp_pairing_complete(struct bt_smp *smp, uint8_t status)
18521852
}
18531853

18541854
if (!atomic_test_bit(smp->flags, SMP_FLAG_KEYS_DISTR)) {
1855-
bt_conn_security_changed(conn, status, auth_err);
1855+
bt_conn_security_changed(conn, status, security_err);
18561856
}
18571857

18581858
if (bt_auth && bt_auth->pairing_failed) {
1859-
bt_auth->pairing_failed(conn, auth_err);
1859+
bt_auth->pairing_failed(conn, security_err);
18601860
}
18611861
}
18621862

0 commit comments

Comments
 (0)