bluetooth: shell: Fix stream_start_sine for single stream
Fixed the stream_start_sine function when omitting the all argument. The verification of the sine checked reversed return value, and was placed in incorrect order. Signed-off-by: Fredrik Danebjer <frdn@demant.com>
This commit is contained in:
parent
6b1a3207dd
commit
37e1a116ef
1 changed files with 5 additions and 5 deletions
|
@ -2697,11 +2697,6 @@ static int cmd_start_sine(const struct shell *sh, size_t argc, char *argv[])
|
|||
shell_print(sh, "Started transmitting on broadcast stream %p", bap_stream);
|
||||
}
|
||||
} else {
|
||||
if (stream_start_sine_verify(default_stream)) {
|
||||
shell_error(sh, "Invalid stream %p", default_stream);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
err = init_lc3(default_stream);
|
||||
if (err != 0) {
|
||||
shell_error(sh, "Failed to init LC3 %d", err);
|
||||
|
@ -2709,6 +2704,11 @@ static int cmd_start_sine(const struct shell *sh, size_t argc, char *argv[])
|
|||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
if (!stream_start_sine_verify(default_stream)) {
|
||||
shell_error(sh, "Invalid stream %p", default_stream);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
err = stream_start_sine(default_stream);
|
||||
if (err != 0) {
|
||||
shell_error(sh, "Failed to start TX for stream %p: %d", default_stream,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue