All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [PATCH] atmodem: implement standard PIN retries
Date: Mon, 31 Jan 2011 14:30:18 +0100	[thread overview]
Message-ID: <1296480618.1520.214.camel@aeonflux> (raw)
In-Reply-To: <201101311522.05246.remi.denis-courmont@nokia.com>

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

Hi Remi,

> > >  drivers/atmodem/sim.c |   48
> > >  ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48
> > >  insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
> > > index 0938998..dfd40f8 100644
> > > --- a/drivers/atmodem/sim.c
> > > +++ b/drivers/atmodem/sim.c
> > > @@ -57,6 +57,7 @@ static const char *cpin_prefix[] = { "+CPIN:", NULL };
> > > 
> > >  static const char *clck_prefix[] = { "+CLCK:", NULL };
> > >  static const char *huawei_cpin_prefix[] = { "^CPIN:", NULL };
> > >  static const char *xpincnt_prefix[] = { "+XPINCNT:", NULL };
> > > 
> > > +static const char *cpinr_prefixes[] = { "+CPINR:", "+CPINRE:", NULL };
> > 
> > if you are not processing +CPINRE, why bother consuming it in the first
> > place?
> 
> So that they're not misinterpreted as unsolicited responses.

they would be. Do you care?

> > >  static const char *none_prefix[] = { NULL };
> > >  
> > >  static void at_crsm_info_cb(gboolean ok, GAtResult *result, gpointer
> > >  user_data)
> > > 
> 
> > > @@ -577,6 +622,9 @@ static void at_pin_retries_query(struct ofono_sim
> > > *sim,
> > > 
> > >  		break;
> > >  	
> > >  	default:
> > > +		if (g_at_chat_send(sd->chat, "AT+CPINR", cpinr_prefixes,
> > > +					at_cpinr_cb, cbd, g_free) > 0)
> > > +			return;
> > 
> > since this command is pretty new, don't we need to check if it is
> > supported? Is there any impact not checking it?
> 
> This will just defer the (failure) callback until the ERROR response.

Okay. If there is no impact here I am fine with it.

Regards

Marcel




  reply	other threads:[~2011-01-31 13:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-31 12:48 [PATCH] atmodem: implement standard PIN retries =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-31 12:59 ` Marcel Holtmann
2011-01-31 13:22   ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-31 13:30     ` Marcel Holtmann [this message]
2011-02-01 12:52 ` Marcel Holtmann
2011-02-01 16:32 ` Marcel Holtmann
2011-02-01 16:34   ` Lucas De Marchi

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=1296480618.1520.214.camel@aeonflux \
    --to=marcel@holtmann.org \
    --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.