mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
bluetooth: Check return value of start_thread()
The function can return an error, so in that case the profile change should fail.
This commit is contained in:
parent
fcfc0e536a
commit
e68712acb4
1 changed files with 2 additions and 2 deletions
|
|
@ -2142,7 +2142,6 @@ static int start_thread(struct userdata *u) {
|
||||||
|
|
||||||
if (!(u->thread = pa_thread_new("bluetooth", thread_func, u))) {
|
if (!(u->thread = pa_thread_new("bluetooth", thread_func, u))) {
|
||||||
pa_log_error("Failed to create IO thread");
|
pa_log_error("Failed to create IO thread");
|
||||||
stop_thread(u);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2233,7 +2232,8 @@ static int card_set_profile(pa_card *c, pa_card_profile *new_profile) {
|
||||||
goto off;
|
goto off;
|
||||||
|
|
||||||
if (u->sink || u->source)
|
if (u->sink || u->source)
|
||||||
start_thread(u);
|
if (start_thread(u) < 0)
|
||||||
|
goto off;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue