From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 4/9] Make sim operations return sim error codes to core.
Date: Thu, 01 Jul 2010 14:16:54 -0500 [thread overview]
Message-ID: <4C2CE9A6.1040508@gmail.com> (raw)
In-Reply-To: <1277806448-5322-4-git-send-email-andrew.zaborowski@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1989 bytes --]
Hi Andrew,
On 06/29/2010 05:14 AM, Andrzej Zaborowski wrote:
> ---
> drivers/atmodem/stk.c | 20 ++++++++++++--------
> include/types.h | 1 +
When you're touching more than two directories, always break the patches
up / directory. In this case resubmit two patches, one for types.h and
separate patch for stk.c
> 2 files changed, 13 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/atmodem/stk.c b/drivers/atmodem/stk.c
> index 8cff4a2..aede668 100644
> --- a/drivers/atmodem/stk.c
> +++ b/drivers/atmodem/stk.c
> @@ -74,11 +74,13 @@ static void at_csim_envelope_cb(gboolean ok, GAtResult *result,
> if (rlen != len * 2 || len < 2)
> goto error;
>
> - if (response[len - 2] != 0x90 && response[len - 2] != 0x91)
> - goto error;
> + if ((response[len - 2] != 0x90 && response[len - 2] != 0x91) ||
> + (response[len - 2] == 0x90 && response[len - 1] != 0)) {
> + memset(&error, 0, sizeof(error));
>
> - if (response[len - 2] == 0x90 && response[len - 1] != 0)
> - goto error;
> + error.type = OFONO_ERROR_TYPE_SIM;
> + error.error = (response[len - 2] << 8) | response[len - 1];
> + }
>
> DBG("csim_envelope_cb: %i", len);
>
> @@ -157,11 +159,13 @@ static void at_csim_terminal_response_cb(gboolean ok, GAtResult *result,
> if (rlen != len * 2 || len < 2)
> goto error;
>
> - if (response[len - 2] != 0x90 && response[len - 2] != 0x91)
> - goto error;
> + if ((response[len - 2] != 0x90 && response[len - 2] != 0x91) ||
> + (response[len - 2] == 0x90 && response[len - 1] != 0)) {
> + memset(&error, 0, sizeof(error));
>
> - if (response[len - 2] == 0x90 && response[len - 1] != 0)
> - goto error;
> + error.type = OFONO_ERROR_TYPE_SIM;
> + error.error = (response[len - 2] << 8) | response[len - 1];
> + }
>
> DBG("csim_terminal_response_cb: %i", len);
>
Do you think it is a good idea to do this for all SIM elementary file
operations as well?
Regards,
-Denis
next prev parent reply other threads:[~2010-07-01 19:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-29 10:14 [PATCH 1/9] stk: Utilities for proactive command/envelope handling Andrzej Zaborowski
2010-06-29 10:14 ` [PATCH 2/9] mbmmodem: Cancel running command on *STKEND Andrzej Zaborowski
2010-06-29 10:14 ` [PATCH 3/9] stk: Handle the More Time command as a nop Andrzej Zaborowski
2010-06-29 10:14 ` [PATCH 4/9] Make sim operations return sim error codes to core Andrzej Zaborowski
2010-07-01 19:16 ` Denis Kenzior [this message]
2010-06-29 10:14 ` [PATCH 5/9] stk: Handle ENVELOPEs in a queue, retry on sim busy Andrzej Zaborowski
2010-07-01 19:57 ` Denis Kenzior
2010-07-02 1:32 ` Andrzej Zaborowski
2010-07-02 2:28 ` Denis Kenzior
2010-07-02 19:15 ` Andrzej Zaborowski
2010-06-29 10:14 ` [PATCH 6/9] Add SimToolkit and SimApplicationAgent interfaces Andrzej Zaborowski
2010-07-02 17:21 ` Denis Kenzior
2010-07-02 19:55 ` Andrzej Zaborowski
2010-07-02 20:20 ` Denis Kenzior
2010-07-02 23:40 ` Andrzej Zaborowski
2010-07-03 0:23 ` Andrzej Zaborowski
2010-07-03 18:24 ` Denis Kenzior
2010-06-29 10:14 ` [PATCH 7/9] stk: Add menu related utilities Andrzej Zaborowski
2010-06-29 10:14 ` [PATCH 8/9] stk: Handle Select Item and Set Up Menu commands Andrzej Zaborowski
2010-06-29 10:14 ` [PATCH 9/9] stk: Handle the Display Text command Andrzej Zaborowski
2010-07-01 19:10 ` [PATCH 1/9] stk: Utilities for proactive command/envelope handling 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=4C2CE9A6.1040508@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.