This patch adds the call of NewConnection method when the SCO connection
is established for HF initiated scenarios.
---
 src/handsfree-audio.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c
index f5d0a7b..6fa8b67 100644
--- a/src/handsfree-audio.c
+++ b/src/handsfree-audio.c
@@ -242,12 +242,19 @@ static gboolean sco_connect_cb(GIOChannel *io, 
GIOCondition cond,
 {
        struct ofono_handsfree_card *card = user_data;
        DBusMessage *reply;
+       int sk;
 
        if (cond & (G_IO_ERR | G_IO_HUP | G_IO_NVAL)) {
                reply = __ofono_error_failed(card->msg);
                goto done;
        }
 
+       sk = g_io_channel_unix_get_fd(io);
+
+       send_new_connection(card->path, sk);
+
+       close(sk);
+
        reply = dbus_message_new_method_return(card->msg);
 
 done:
-- 
1.7.11.7

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

Reply via email to