From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v2 1/1] Add telephony_str_to_error to decode error code
Date: Wed, 12 May 2010 14:02:17 -0500 [thread overview]
Message-ID: <201005121402.18171.denkenz@gmail.com> (raw)
In-Reply-To: <1273651973-2461-2-git-send-email-zhenhua.zhang@intel.com>
[-- Attachment #1: Type: text/plain, Size: 802 bytes --]
Hi Zhenhua,
> +static gboolean search_entry(const char *str, struct error_entry *e,
> + int maxentries,
> + enum ofono_error_type type,
> + struct ofono_error *error)
> +{
> + int i;
> +
> + for (i = 0; i < maxentries; i++) {
> + if (!strcmp(e[i].str, str)) {
> + error->type = type;
> + error->error = e[i].error;
> + return TRUE;
> + }
> + }
> +
> + return FALSE;
> +}
This doesn't really make sense, the errors from the modem usually come in the
form of +CMS ERROR: 123 assuming we enabled +CMEE=1. If we enabled +CMEE=2
then the numeric error code gets converted to a string. The former is
preferable as the string might be different from what oFono has. What you're
matching here will always result in an unknown error.
Regards,
-Denis
next prev parent reply other threads:[~2010-05-12 19:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-12 8:12 [PATCH v2 0/1] Add telephony_str_to_error to decode error code Zhenhua Zhang
2010-05-12 8:12 ` [PATCH v2 1/1] " Zhenhua Zhang
2010-05-12 19:02 ` Denis Kenzior [this message]
2010-05-13 2:09 ` Zhang, Zhenhua
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=201005121402.18171.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