shell: Bluetooth: Fix auto-connect
The logic was still trying to parse the address even though one was already stored. Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This commit is contained in:
parent
a24007c35e
commit
975fd4787b
1 changed files with 6 additions and 6 deletions
|
@ -2045,12 +2045,12 @@ static int cmd_connect_le(const struct shell *sh, size_t argc, char *argv[])
|
||||||
|
|
||||||
return SHELL_CMD_HELP_PRINTED;
|
return SHELL_CMD_HELP_PRINTED;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
err = bt_addr_le_from_str(argv[1], argv[2], &addr);
|
||||||
err = bt_addr_le_from_str(argv[1], argv[2], &addr);
|
if (err) {
|
||||||
if (err) {
|
shell_error(sh, "Invalid peer address (err %d)", err);
|
||||||
shell_error(sh, "Invalid peer address (err %d)", err);
|
return err;
|
||||||
return err;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_BT_EXT_ADV)
|
#if defined(CONFIG_BT_EXT_ADV)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue