From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 1/1] isigen: create four gprs contexts
Date: Thu, 11 Nov 2010 09:11:28 -0600 [thread overview]
Message-ID: <4CDC07A0.6030400@gmail.com> (raw)
In-Reply-To: <1289469648-18472-2-git-send-email-mika.liljeberg@nokia.com>
[-- Attachment #1: Type: text/plain, Size: 1895 bytes --]
Hi Mika,
On 11/11/2010 04:00 AM, Mika Liljeberg wrote:
> ---
> plugins/isigen.c | 19 ++++++++++++++-----
> 1 files changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/plugins/isigen.c b/plugins/isigen.c
> index 838d060..3ea7110 100644
> --- a/plugins/isigen.c
> +++ b/plugins/isigen.c
> @@ -58,6 +58,8 @@
> #include "drivers/isimodem/mtc.h"
> #include "drivers/isimodem/debug.h"
>
> +#define ISI_DEFAULT_PDPS 4 /* Number of supported PDP contexts */
> +
> struct isi_data {
> struct ofono_modem *modem;
> char const *ifname;
> @@ -407,6 +409,7 @@ static void isigen_post_online(struct ofono_modem *modem)
> struct isi_data *isi = ofono_modem_get_data(modem);
> struct ofono_gprs *gprs;
> struct ofono_gprs_context *gc;
> + int i;
>
> DBG("(%p) with %s", modem, isi->ifname);
>
> @@ -420,13 +423,19 @@ static void isigen_post_online(struct ofono_modem *modem)
> ofono_call_barring_create(isi->modem, 0, "isimodem", isi->idx);
> ofono_call_meter_create(isi->modem, 0, "isimodem", isi->idx);
> ofono_radio_settings_create(isi->modem, 0, "isimodem", isi->idx);
> - gprs = ofono_gprs_create(isi->modem, 0, "isimodem", isi->idx);
> - gc = ofono_gprs_context_create(isi->modem, 0, "isimodem", isi->idx);
>
> - if (gprs && gc)
> + gprs = ofono_gprs_create(isi->modem, 0, "isimodem", isi->idx);
> + if (!gprs)
> + return;
Tiny nitpick, but please follow the coding style. Specifically item M1.
> + for (i = 0; i < ISI_DEFAULT_PDPS; i++) {
> + gc = ofono_gprs_context_create(isi->modem, 0,
> + "isimodem", isi->idx);
> + if (!gc) {
> + DBG("Failed to add context %d", i);
> + break;
> + }
And again, item M1 here
> ofono_gprs_add_context(gprs, gc);
> - else
> - DBG("Failed to add context");
> + }
> }
>
> static int isigen_enable(struct ofono_modem *modem)
Regards,
-Denis
next prev parent reply other threads:[~2010-11-11 15:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-11 10:00 isigen: enabled multiple PDP contexts Mika Liljeberg
2010-11-11 10:00 ` [PATCH 1/1] isigen: create four gprs contexts Mika Liljeberg
2010-11-11 15:11 ` Denis Kenzior [this message]
2010-11-11 15:24 ` Mika.Liljeberg
2010-11-11 10:07 ` isigen: enabled multiple PDP contexts Marcel Holtmann
2010-11-11 10:55 ` Mika.Liljeberg
-- strict thread matches above, loose matches on Subject: below --
2010-11-11 15:49 isigen: create four gprs contexts Mika Liljeberg
2010-11-11 15:50 ` [PATCH 1/1] " Mika Liljeberg
2010-11-11 15:53 ` 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=4CDC07A0.6030400@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.