From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 7/7] Fix: isimodem handling of call barring services.
Date: Thu, 18 Mar 2010 11:51:29 -0500 [thread overview]
Message-ID: <201003181151.29899.denkenz@gmail.com> (raw)
In-Reply-To: <1268923471-29059-7-git-send-email-ppessi@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1650 bytes --]
Hi Pekka,
> From: Pekka Pessi <Pekka.Pessi@nokia.com>
>
>
> Signed-off-by: Pekka Pessi <Pekka.Pessi@nokia.com>
> ---
> drivers/isimodem/call-barring.c | 64
> ++++++++++++++++++++------------------ drivers/isimodem/ss.h |
> 28 +++++++++--------
> 2 files changed, 49 insertions(+), 43 deletions(-)
> @@ -105,7 +104,9 @@ static void isi_set(struct ofono_call_barring *barr,
> const char *lock, DBG("lock code %s enable %d class %d password %s\n",
> lock, enable, cls, passwd);
>
> - if (!cbd || !passwd || strlen(passwd) > 4 || cls != 7)
> + if (!cbd || !lock)
> + goto error;
> + if (!passwd || strlen(passwd) != 4 || strspn(passwd, "0123456789") != 4)
> goto error;
I suggest not doing this checking in the driver code, if the core is sending
you something you don't expect, let us fix the core.
>
> if (strcmp(lock, "AO") == 0)
> @@ -120,23 +121,23 @@ static void isi_set(struct ofono_call_barring *barr,
> const char *lock, ss_code = SS_GSM_BARR_ALL_IN_ROAM;
> else if (strcmp(lock, "AB") == 0)
> ss_code = SS_GSM_ALL_BARRINGS;
> + else if (enable)
> + /* Only Deactivate supports AG (333) and AC (353) */
> + goto error;
Same here, to my knowledge the core never actually allows this.
> - if (!cbd || strlen(old_passwd) > 4 || strlen(new_passwd) > 4)
> + if (!cbd)
> + goto error;
> + if (strlen(old_passwd) != 4 || strspn(old_passwd, "0123456789") != 4)
> + goto error;
> + if (strlen(new_passwd) != 4 || strspn(new_passwd, "0123456789") != 4)
> goto error;
Again, let us fix the core so you guys don't have to do this checking.
Regards,
-Denis
next prev parent reply other threads:[~2010-03-18 16:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-18 14:44 [PATCH 1/7] Barring services can only be activated/deactivated ppessi
2010-03-18 14:44 ` [PATCH 2/7] Return newly-queried barring status ppessi
2010-03-18 14:44 ` [PATCH 3/7] Number of barring services is constant ppessi
2010-03-18 14:44 ` [PATCH 4/7] Network password has exactly 4 digits ppessi
2010-03-18 14:44 ` [PATCH 5/7] Interrogation of a barring does not require password ppessi
2010-03-18 14:44 ` [PATCH 6/7] Added call-barring-api.txt ppessi
2010-03-18 14:44 ` [PATCH 7/7] Fix: isimodem handling of call barring services ppessi
2010-03-18 16:51 ` Denis Kenzior [this message]
2010-03-18 17:38 ` Pekka Pessi
2010-03-18 17:50 ` Denis Kenzior
2010-03-18 16:46 ` [PATCH 6/7] Added call-barring-api.txt Denis Kenzior
2010-03-18 16:44 ` [PATCH 5/7] Interrogation of a barring does not require password Denis Kenzior
2010-03-18 16:43 ` [PATCH 4/7] Network password has exactly 4 digits Denis Kenzior
2010-03-19 14:36 ` Pekka Pessi
2010-03-18 16:40 ` [PATCH 3/7] Number of barring services is constant Denis Kenzior
2010-03-18 16:39 ` [PATCH 2/7] Return newly-queried barring status Denis Kenzior
2010-03-18 16:11 ` [PATCH 1/7] Barring services can only be activated/deactivated 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=201003181151.29899.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