From: Johan Hedberg <johan.hedberg@gmail.com>
To: ofono@ofono.org
Subject: Re: [RFC v0 11/13] handsfree-audio: Add sending SCO fd
Date: Mon, 11 Mar 2013 07:55:47 -0700 [thread overview]
Message-ID: <20130311145547.GA28047@x220> (raw)
In-Reply-To: <1362784285-22731-12-git-send-email-claudio.takahasi@openbossa.org>
[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]
Hi Claudio,
On Fri, Mar 08, 2013, Claudio Takahasi wrote:
> 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);
Shouldn't you be adding a watch for the connected SCO socket instead of
closing it? Is it not necessary for oFono to know the SCO state? (to
detect when PA did shutdown() on the socket, return "already connected"
for Connect(), etc.)
Johan
next prev parent reply other threads:[~2013-03-11 14:55 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-08 23:11 [RFC v0 00/13] Add handsfree audio card driver Claudio Takahasi
2013-03-08 23:11 ` [RFC v0 01/13] handsfree-audio: Add " Claudio Takahasi
2013-03-08 23:11 ` [RFC v0 02/13] hfp_hf_bluez5: Register handsfree audio driver Claudio Takahasi
2013-03-11 14:30 ` Claudio Takahasi
2013-03-08 23:11 ` [RFC v0 03/13] hfp_hf_bluez5: Add extracting version Claudio Takahasi
2013-03-08 23:11 ` [RFC v0 04/13] handsfree-audio: Add version to card driver Claudio Takahasi
2013-03-08 23:11 ` [RFC v0 05/13] hfp_hf_bluez5: Pass version to card registration Claudio Takahasi
2013-03-08 23:11 ` [RFC v0 06/13] hfp_hf_bluez5: Add version to HFP 1.5 card driver Claudio Takahasi
2013-03-08 23:11 ` [RFC v0 07/13] core: Add bt_str2ba() to bluetooth.h Claudio Takahasi
2013-03-08 23:11 ` [RFC v0 08/13] hfp_hf_bluez5: Add HFP 1.5 card connect callback Claudio Takahasi
2013-03-08 23:11 ` [RFC v0 09/13] handsfree-audio: Add calling " Claudio Takahasi
2013-03-08 23:11 ` [RFC v0 10/13] handsfree-audio: Add connect GIOChannel watch Claudio Takahasi
2013-03-08 23:11 ` [RFC v0 11/13] handsfree-audio: Add sending SCO fd Claudio Takahasi
2013-03-11 14:55 ` Johan Hedberg [this message]
2013-03-11 16:36 ` Claudio Takahasi
2013-03-08 23:11 ` [RFC v0 12/13] handsfree-audio: Return an error on Card Connect Claudio Takahasi
2013-03-08 23:11 ` [RFC v0 13/13] handsfree-audio: Check agent before sending fd Claudio Takahasi
2013-03-12 12:41 ` [PATCH v0 00/15] Add handsfree audio card driver Claudio Takahasi
2013-03-12 12:41 ` [PATCH v0 01/15] handsfree-audio: Add " Claudio Takahasi
2013-03-13 16:53 ` Frederic Danis
2013-03-13 17:46 ` Denis Kenzior
2013-03-14 9:59 ` Frederic Danis
2013-03-18 18:58 ` Denis Kenzior
2013-03-12 12:42 ` [PATCH v0 02/15] hfp_hf_bluez5: Register handsfree audio driver Claudio Takahasi
2013-03-18 18:59 ` Denis Kenzior
2013-03-12 12:42 ` [PATCH v0 03/15] hfp_hf_bluez5: Add extracting version Claudio Takahasi
2013-03-18 18:55 ` Denis Kenzior
2013-03-12 12:42 ` [PATCH v0 04/15] handsfree-audio: Add version to card driver Claudio Takahasi
2013-03-18 18:59 ` Denis Kenzior
2013-03-12 12:42 ` [PATCH v0 05/15] hfp_hf_bluez5: Pass version to card registration Claudio Takahasi
2013-03-12 12:42 ` [PATCH v0 06/15] hfp_hf_bluez5: Add version to HFP 1.5 card driver Claudio Takahasi
2013-03-12 12:42 ` [PATCH v0 07/15] core: Add bt_str2ba() to bluetooth.h Claudio Takahasi
2013-03-18 19:00 ` Denis Kenzior
2013-03-12 12:42 ` [PATCH v0 08/15] hfp_hf_bluez5: Add HFP 1.5 connect implementation Claudio Takahasi
2013-03-12 12:42 ` [PATCH v0 09/15] handsfree-audio: Add calling connect callback Claudio Takahasi
2013-03-12 12:42 ` [PATCH v0 10/15] handsfree-audio: Add connect GIOChannel watch Claudio Takahasi
2013-03-12 12:42 ` [PATCH v0 11/15] handsfree-audio: Add sending SCO fd Claudio Takahasi
2013-03-12 12:42 ` [PATCH v0 12/15] handsfree-audio: Return NotAvailable on "Connect" Claudio Takahasi
2013-03-12 12:42 ` [PATCH v0 13/15] handsfree-audio: Return InProgress on Connect Claudio Takahasi
2013-03-12 15:26 ` Frederic Danis
2013-03-12 17:26 ` Claudio Takahasi
2013-03-12 12:42 ` [PATCH v0 14/15] handsfree-audio: Check agent before sending fd Claudio Takahasi
2013-03-12 12:42 ` [PATCH v0 15/15] doc: Add Handsfree Audio Card "Connect" errors Claudio Takahasi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130311145547.GA28047@x220 \
--to=johan.hedberg@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.