From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 5/6] dun_gw: Add DUN server plugin for oFono
Date: Mon, 13 Sep 2010 13:18:02 -0500 [thread overview]
Message-ID: <4C8E6ADA.9030402@gmail.com> (raw)
In-Reply-To: <1284355314-16253-6-git-send-email-zhenhua.zhang@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]
Hi Zhenhua,
> + if (g_str_equal(property, "Online") == TRUE) {
> + const char *path = dbus_message_get_path(msg);
> + struct ofono_modem *modem;
> + struct ofono_atom *gprs;
> + gboolean online;
> +
> + if (!dbus_message_iter_next(&iter))
> + return FALSE;
> +
> + if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_VARIANT)
> + return FALSE;
> +
> + dbus_message_iter_recurse(&iter, &var);
> +
> + dbus_message_iter_get_basic(&var, &online);
> +
> + if (online == FALSE) {
> + bluetooth_unregister_server(server);
> + server = NULL;
> + goto done;
> + }
> +
> + /* Create DUN server */
> + modem = ofono_modem_get_modem_by_path(path);
> + gprs = __ofono_modem_find_atom(modem,
> + OFONO_ATOM_TYPE_GPRS);
> + /* Make sure the modem has GPRS atom */
> + if (!gprs)
> + goto done;
> +
> + server = bluetooth_register_server(DUN_GW,
> + "Dial-Up Networking", DUN_GW_CHANNEL,
> + dun_gw_connect_cb, modem);
> + }
> +
> +done:
> + return TRUE;
> +}
Please don't do it this way. Instead add a new modem_state_watch
function to modem.c for accomplishing this.
Regards,
-Denis
next prev parent reply other threads:[~2010-09-13 18:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-13 5:21 [PATCH 0/6]Add DUN emulator in oFono Zhenhua Zhang
2010-09-13 5:21 ` [PATCH 1/6] bluetooth: Add reference count for bluetooth utils Zhenhua Zhang
2010-09-13 5:21 ` [PATCH 2/6] bluetooth: Add Btio library for DUN Zhenhua Zhang
2010-09-13 5:21 ` [PATCH 3/6] bluetooth: Add bluetooth server support " Zhenhua Zhang
2010-09-13 5:21 ` [PATCH 4/6] modem: Add method to get modem by path Zhenhua Zhang
2010-09-13 5:21 ` [PATCH 5/6] dun_gw: Add DUN server plugin for oFono Zhenhua Zhang
2010-09-13 18:18 ` Denis Kenzior [this message]
2010-09-13 5:21 ` [PATCH 6/6] emulator: Add emulator atom in oFono Zhenhua Zhang
-- strict thread matches above, loose matches on Subject: below --
2010-08-05 1:51 [PATCH 1/6] bluetooth: Add reference count for bluetooth utils Zhenhua Zhang
2010-08-05 1:51 ` [PATCH 5/6] dun_gw: Add DUN server plugin for oFono Zhenhua Zhang
2010-07-29 7:18 [PATCH 0/6] oFono patches for BT DUN server Zhenhua Zhang
2010-07-29 7:18 ` [PATCH 5/6] dun_gw: Add DUN server plugin for oFono Zhenhua Zhang
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=4C8E6ADA.9030402@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.