From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 2/3] hfp: Don't call UnregisterAgent if a Release was received
Date: Thu, 04 Feb 2010 16:00:10 -0600 [thread overview]
Message-ID: <201002041600.10433.denkenz@gmail.com> (raw)
In-Reply-To: <1265319021-28299-2-git-send-email-padovan@profusion.mobi>
[-- Attachment #1: Type: text/plain, Size: 1301 bytes --]
Hi Gustavo,
> Prevent to call UnregisterAgent on an already unregistered agent.
> ---
> plugins/hfp.c | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/plugins/hfp.c b/plugins/hfp.c
> index cd43af7..4202ddf 100644
> --- a/plugins/hfp.c
> +++ b/plugins/hfp.c
> @@ -760,8 +760,11 @@ static int hfp_probe(struct ofono_modem *modem)
> static void hfp_remove(struct ofono_modem *modem)
> {
> struct hfp_data *data = ofono_modem_get_data(modem);
> + const char *obj_path = ofono_modem_get_path(modem);
>
> - hfp_unregister_ofono_handsfree(modem);
> + if (g_dbus_unregister_interface(connection, obj_path,
> + HFP_AGENT_INTERFACE))
> + hfp_unregister_ofono_handsfree(modem);
>
> g_hash_table_remove(uuid_hash, data->handsfree_path);
>
> @@ -804,10 +807,14 @@ static int hfp_disconnect_ofono_handsfree(struct
> ofono_modem *modem)
>
> static int hfp_disable(struct ofono_modem *modem)
> {
> + const char *obj_path = ofono_modem_get_path(modem);
> +
> DBG("%p", modem);
>
> clear_data(modem);
>
> + g_dbus_unregister_interface(connection, obj_path, HFP_AGENT_INTERFACE);
> +
Shouldn't this part be in agent_release?
> hfp_disconnect_ofono_handsfree(modem);
> return 0;
> }
>
Regards,
-Denis
next prev parent reply other threads:[~2010-02-04 22:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-04 21:30 [PATCH 1/3] hfp: create modem for new devices paired on runtime Gustavo F. Padovan
2010-02-04 21:30 ` [PATCH 2/3] hfp: Don't call UnregisterAgent if a Release was received Gustavo F. Padovan
2010-02-04 21:30 ` [PATCH 3/3] hfp: wait Disconnect reply to power down the modem Gustavo F. Padovan
2010-02-04 22:00 ` Denis Kenzior [this message]
2010-02-04 21:58 ` [PATCH 1/3] hfp: create modem for new devices paired on runtime Denis Kenzior
-- strict thread matches above, loose matches on Subject: below --
2010-02-05 18:47 Gustavo F. Padovan
2010-02-05 18:47 ` [PATCH 2/3] hfp: Don't call UnregisterAgent if a Release was received Gustavo F. Padovan
2010-02-05 19:37 ` 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=201002041600.10433.denkenz@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox