[pulseaudio-discuss] [PATCH v2 7/7] bluetooth: ofono: Fix failing to parse valid NewConnection

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


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

When suspending due to idle timeout the transport will not change its
state.
---
 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 5ef7e4f..4907f96 100644
--- a/src/modules/bluetooth/backend-ofono.c
+++ b/src/modules/bluetooth/backend-ofono.c
@@ -548,7 +548,7 @@ static DBusMessage *hf_audio_agent_new_connection(DBusConnection *c, DBusMessage
 
     card->connecting = false;
 
-    if (!card || codec != HFP_AUDIO_CODEC_CVSD || card->transport->state == PA_BLUETOOTH_TRANSPORT_STATE_PLAYING) {
+    if (!card || codec != HFP_AUDIO_CODEC_CVSD || card->fd >= 0) {
         pa_log_warn("New audio connection invalid arguments (path=%s fd=%d, codec=%d)", path, fd, codec);
         pa_assert_se(r = dbus_message_new_error(m, "org.ofono.Error.InvalidArguments", "Invalid arguments in method call"));
         shutdown(fd, SHUT_RDWR);
-- 
2.9.3



More information about the pulseaudio-discuss mailing list