From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH -v5 04/13] sap: enable SAP modem, when BlueZ replies
Date: Thu, 29 Sep 2011 10:54:16 -0500 [thread overview]
Message-ID: <4E8494A8.2010805@gmail.com> (raw)
In-Reply-To: <1317245061-6312-4-git-send-email-padovan@profusion.mobi>
[-- Attachment #1: Type: text/plain, Size: 1681 bytes --]
Hi Gustavo,
On 09/28/2011 04:24 PM, Gustavo F. Padovan wrote:
> From: "Gustavo F. Padovan" <padovan@profusion.mobi>
>
> ---
> plugins/sap.c | 22 ++++++++++++++++++----
> 1 files changed, 18 insertions(+), 4 deletions(-)
>
Patch has been applied, one thing:
> diff --git a/plugins/sap.c b/plugins/sap.c
> index 28b07e7..850ed2f 100644
> --- a/plugins/sap.c
> +++ b/plugins/sap.c
> @@ -127,6 +127,7 @@ static void sap_connect_reply(DBusPendingCall *call, gpointer user_data)
> struct sap_data *data = ofono_modem_get_data(modem);
> DBusError derr;
> DBusMessage *reply;
> + int fd, err;
>
> DBG("");
>
> @@ -138,16 +139,29 @@ static void sap_connect_reply(DBusPendingCall *call, gpointer user_data)
> goto done;
>
> dbus_error_init(&derr);
> - if (!dbus_set_error_from_message(&derr, reply))
> + if (dbus_set_error_from_message(&derr, reply)) {
> +
> + DBG("Connect reply: %s", derr.message);
> +
> + dbus_error_free(&derr);
> goto done;
> + }
>
> - DBG("Connect reply: %s", derr.message);
> + if (!dbus_message_get_args(reply, NULL, DBUS_TYPE_UNIX_FD, &fd,
> + DBUS_TYPE_INVALID))
> + goto done;
>
> - ofono_modem_set_powered(modem, FALSE);
> + data->hw_modem = sap_hw_modem;
> + data->sap_driver = sap_hw_driver;
>
> - dbus_error_free(&derr);
> + err = data->sap_driver->enable(data->hw_modem, modem, fd);
> + if (err == -EINPROGRESS) {
> + dbus_message_unref(reply);
> + return;
> + }
If enable fails, what should be done to the fd we got from bluetoothd?
>
> done:
> + ofono_modem_set_powered(modem, FALSE);
> dbus_message_unref(reply);
> }
>
Regards,
-Denis
next prev parent reply other threads:[~2011-09-29 15:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 21:24 [PATCH -v5 01/13] udevng: look also to VID Gustavo F. Padovan
2011-09-28 21:24 ` [PATCH -v5 02/13] sap: remove connect callback if enable fails Gustavo F. Padovan
2011-09-28 21:24 ` [PATCH -v5 03/13] telit: add support the enable the SAP client modem Gustavo F. Padovan
2011-09-28 21:24 ` [PATCH -v5 04/13] sap: enable SAP modem, when BlueZ replies Gustavo F. Padovan
2011-09-28 21:24 ` [PATCH -v5 05/13] telit: add suport the disable SAP client Gustavo F. Padovan
2011-09-28 21:24 ` [PATCH -v5 06/13] sap: add sap modem disable() support Gustavo F. Padovan
2011-09-28 21:24 ` [PATCH -v5 07/13] telit: enable the telit modem after enable SAP client Gustavo F. Padovan
2011-09-28 21:24 ` [PATCH -v5 08/13] telit: add pre_sim support to SAP Client Gustavo F. Padovan
2011-09-28 21:24 ` [PATCH -v5 09/13] telit: add post_sim " Gustavo F. Padovan
2011-09-28 21:24 ` [PATCH -v5 10/13] telit: add set_online " Gustavo F. Padovan
2011-09-28 21:24 ` [PATCH -v5 11/13] telit: add post_online " Gustavo F. Padovan
2011-09-28 21:24 ` [PATCH -v5 12/13] sap: add full support to SAP modem Gustavo F. Padovan
2011-09-28 21:24 ` [PATCH -v5 13/13] sap: clean up extra blank line Gustavo F. Padovan
2011-09-29 16:22 ` Denis Kenzior
2011-09-29 16:22 ` [PATCH -v5 12/13] sap: add full support to SAP modem Denis Kenzior
2011-09-29 16:21 ` [PATCH -v5 11/13] telit: add post_online to SAP Client Denis Kenzior
2011-09-29 16:20 ` [PATCH -v5 10/13] telit: add set_online " Denis Kenzior
2011-09-29 16:20 ` [PATCH -v5 09/13] telit: add post_sim " Denis Kenzior
2011-09-29 16:20 ` [PATCH -v5 08/13] telit: add pre_sim support " Denis Kenzior
2011-09-29 16:19 ` [PATCH -v5 07/13] telit: enable the telit modem after enable SAP client Denis Kenzior
2011-09-29 16:15 ` [PATCH -v5 05/13] telit: add suport the disable " Denis Kenzior
2011-09-29 15:54 ` Denis Kenzior [this message]
2011-09-29 15:53 ` [PATCH -v5 03/13] telit: add support the enable the SAP client modem Denis Kenzior
2011-09-29 15:50 ` [PATCH -v5 02/13] sap: remove connect callback if enable fails Denis Kenzior
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=4E8494A8.2010805@gmail.com \
--to=denkenz@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.