Bluetooth: SMP: Fix legacy passkey entry for central role

In legacy passkey entry method confirm value is sent first.

Change-Id: Ic379650dab64715be6d281fa8d3389f5ff34a978
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
Szymon Janc 2016-01-26 20:56:52 +01:00 committed by Anas Nashif
commit e6f0356df7

View file

@ -1241,8 +1241,8 @@ static uint8_t legacy_pairing_confirm(struct bt_smp *smp)
#if defined(CONFIG_BLUETOOTH_CENTRAL)
if (smp->chan.conn->role == BT_HCI_ROLE_MASTER) {
atomic_set_bit(&smp->allowed_cmds, BT_SMP_CMD_PAIRING_RANDOM);
return smp_send_pairing_random(smp);
atomic_set_bit(&smp->allowed_cmds, BT_SMP_CMD_PAIRING_CONFIRM);
return legacy_send_pairing_confirm(smp);
}
#endif /* CONFIG_BLUETOOTH_CENTRAL */