Bluetooth: shell: Use selected ID when selecting default connection

Use the selected local ID when switching the default connection.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
Joakim Andersson 2020-07-15 12:31:49 +02:00 committed by Carles Cufí
commit 4876923085

View file

@ -1380,7 +1380,7 @@ static int cmd_select(const struct shell *shell, size_t argc, char *argv[])
return err;
}
conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, &addr);
conn = bt_conn_lookup_addr_le(selected_id, &addr);
if (!conn) {
shell_error(shell, "No matching connection found");
return -ENOEXEC;