All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] mbm: poll SIM status when initializing
Date: Wed, 14 Jul 2010 11:40:16 -0500	[thread overview]
Message-ID: <4C3DE870.5030604@gmail.com> (raw)
In-Reply-To: <1279124912-13663-1-git-send-email-Pekka.Pessi@nokia.com>

[-- Attachment #1: Type: text/plain, Size: 957 bytes --]

Hi Pekka,

> @@ -54,6 +55,8 @@ static const char *none_prefix[] = { NULL };
>  struct mbm_data {
>  	GAtChat *modem_port;
>  	GAtChat *data_port;
> +	guint sim_poll;
> +	guint sim_polled;
>  	gboolean have_sim;
>  };

Can we rename sim_poll to cpin_poll_source?

Can we rename sim_polled to cpin_poll_retry or cpin_poll_retries?

> -	/* Modem returns error if there is no SIM in slot */
> +	/* Modem returns +CME ERROR: 10 if SIM is not ready. */
> +	if (!ok && result->final_or_pdu &&
> +		!strcmp(result->final_or_pdu, "+CME ERROR: 10") &&
> +		data->sim_polled++ < 5) {
> +		data->sim_poll =
> +			g_timeout_add_seconds(1, init_simpin_check, modem);
> +		return;
> +	}
> +

Please note that whenever you have a multi-line if condition like the
one above, the conditions after the if should be indented one more level
than the if body block.  E.g. put an extra indent before !strcmp and
data->sim_polled.

Regards,
-Denis

  reply	other threads:[~2010-07-14 16:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-14 16:28 [PATCH] mbm: poll SIM status when initializing Pekka.Pessi
2010-07-14 16:40 ` Denis Kenzior [this message]
2010-07-15 14:05   ` Pekka.Pessi
2010-07-15 14:20     ` Denis Kenzior
  -- strict thread matches above, loose matches on Subject: below --
2010-07-14 15:43 Pekka.Pessi
2010-07-14 16:00 ` Denis Kenzior
2010-07-14 16:15   ` Pekka Pessi

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=4C3DE870.5030604@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.