bluetooth: host: Use correct identity when direct advertising

When starting direct advertising use correct identity during
connection lookup.

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
This commit is contained in:
Pawel Dunaj 2019-04-17 17:32:08 +02:00 committed by Carles Cufí
commit d4dbab9f83

View file

@ -2031,7 +2031,7 @@ struct bt_conn *bt_conn_create_slave_le(const bt_addr_le_t *peer,
param_int.options |= (BT_LE_ADV_OPT_CONNECTABLE |
BT_LE_ADV_OPT_ONE_TIME);
conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, peer);
conn = bt_conn_lookup_addr_le(param->id, peer);
if (conn) {
switch (conn->state) {
case BT_CONN_CONNECT_DIR_ADV: