This patch returns "Operation already in progress" if there is a
pending Handsfree Audio Card "Connect" method call pending.
---
 src/handsfree-audio.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c
index 8950347..805f3b6 100644
--- a/src/handsfree-audio.c
+++ b/src/handsfree-audio.c
@@ -285,6 +285,9 @@ static DBusMessage *card_connect(DBusConnection *conn,
        if (agent == NULL)
                return __ofono_error_not_available(msg);
 
+       if (card->msg)
+               return __ofono_error_busy(msg);
+
        sk = driver->audio_connect(card->remote, card->local);
        if (sk < 0)
                return __ofono_error_failed(msg);
-- 
1.7.11.7

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to