[pulseaudio-discuss] [PATCH v2 1/7] bluetooth: ofono: Don't attempt to connect if fd is ready

Luiz Augusto von Dentz luiz.dentz at gmail.com
Tue Apr 25 10:19:05 UTC 2017


From: Luiz Augusto von Dentz <luiz.von.dentz at intel.com>

If SCO fd is already set don't attempt to connect again.
---
 src/modules/bluetooth/backend-ofono.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/bluetooth/backend-ofono.c b/src/modules/bluetooth/backend-ofono.c
index 755df9e..e18772d 100644
--- a/src/modules/bluetooth/backend-ofono.c
+++ b/src/modules/bluetooth/backend-ofono.c
@@ -155,7 +155,7 @@ static int hf_audio_agent_transport_acquire(pa_bluetooth_transport *t, bool opti
 
     pa_assert(card);
 
-    if (!optional) {
+    if (!optional && card->fd < 0) {
         DBusMessage *m;
 
         pa_assert_se(m = dbus_message_new_method_call(t->owner, t->path, "org.ofono.HandsfreeAudioCard", "Connect"));
-- 
2.9.3



More information about the pulseaudio-discuss mailing list