From: Mikel Astiz <[email protected]>
The function can return an error, so in that case the profile change
should fail.
---
src/modules/bluetooth/module-bluetooth-device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules/bluetooth/module-bluetooth-device.c
b/src/modules/bluetooth/module-bluetooth-device.c
index b6bdd52..68838e7 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -2146,7 +2146,6 @@ static int start_thread(struct userdata *u) {
if (!(u->thread = pa_thread_new("bluetooth", thread_func, u))) {
pa_log_error("Failed to create IO thread");
- stop_thread(u);
return -1;
}
@@ -2269,7 +2268,8 @@ static int card_set_profile(pa_card *c, pa_card_profile
*new_profile) {
goto off;
if (u->sink || u->source)
- start_thread(u);
+ if (start_thread(u) < 0)
+ goto off;
move_all_end(u, inputs, outputs);
--
1.7.11.4
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss