From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 4/6] gemalto: handle sim is inserted or removed URCs
Date: Fri, 16 Mar 2018 09:03:22 -0500 [thread overview]
Message-ID: <3a3ffd63-06ca-a9e7-c523-650000dd4b59@gmail.com> (raw)
In-Reply-To: <a6430159-0f4b-277c-9d3d-3c4c8cca6d33@smile.fr>
[-- Attachment #1: Type: text/plain, Size: 1762 bytes --]
Hi Gabriel,
On 03/16/2018 08:28 AM, Gabriel Lucas wrote:
> Hi Denis,
>
> On 15/03/2018 18:26, Denis Kenzior wrote:
>> Hi Gabriel,
>>
>> On 03/15/2018 07:49 AM, Gabriel Lucas wrote:
>>> From: Mariem Cherif <mariem.cherif@ardia.com.tn>
>>>
>>> + g_at_result_iter_init(&iter, result);
>>> +
>>> + if (!g_at_result_iter_next(&iter, "+CIEV:"))
>>> + return;
>>> +
>>
>> So generally +CIEV indication is an <index>,<value> syntax.
> We receive this kind of signal: +CIEV: simstatus,<status>.
> In this code, Mariem is ensuring the index is simstatus.
> Do you prefer us to use g_at_result_iter_next to handle the index ?
> Or even to use "+CIEV: simstatus" as prefix in the register function ?
Okay, that makes sense now. Gemalto should really fix their firmware as
this syntax is not really correct, but nothing we can do about it now.
I would stick with the current approach.
>>> + if (!g_at_result_iter_next_unquoted_string(&iter, &ind_str))
>>> + return;
>>
>> Does Gemalto use some other syntax here? If so, you might want to
>> document a simple example above.
> I've added a comment
>>> + ofono_sim_inserted_notify(sim, FALSE);
>>> + } else if(status == 1) {
>>> + ofono_sim_inserted_notify(sim, TRUE);
>>> + }
>>
>> Okay, but simpler written as ofono_sim_inserted_notify(sim, status);
> The thing is we don't only receive the status 0 and 1. We also have 4
> (ALS3) and
> 5 (ALS3 + PHS8P). Only the first two should be used.
In that case I would use a switch/case statement, add a case label
/comment for the other possibilities and what they mean and simply use a
'break' statement for those.
Regards,
-Denis
next prev parent reply other threads:[~2018-03-16 14:03 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-15 12:49 [PATCH 0/6] gemalto's ALS3 and PHS8P support Gabriel Lucas
2018-03-15 12:49 ` [PATCH 1/6] gemalto: add detection of ALS3 modem Gabriel Lucas
2018-03-15 17:22 ` Denis Kenzior
2018-03-15 12:49 ` [PATCH 2/6] gemalto: support ALS3 in gemalto's plugin Gabriel Lucas
2018-03-15 17:11 ` Denis Kenzior
2018-03-16 10:30 ` Gabriel Lucas
2018-03-16 14:23 ` Denis Kenzior
2018-03-16 15:53 ` Gabriel Lucas
2018-03-16 15:59 ` Gabriel Lucas
2018-03-16 16:08 ` Gabriel Lucas
2018-03-16 16:08 ` Denis Kenzior
2018-03-19 9:45 ` Gabriel Lucas
2018-03-19 13:50 ` Denis Kenzior
2018-03-19 15:15 ` Gabriel Lucas
2018-03-19 15:24 ` Denis Kenzior
2018-03-15 12:49 ` [PATCH 3/6] gemalto: acquire the network technology Gabriel Lucas
2018-03-15 17:19 ` Denis Kenzior
2018-03-16 12:04 ` Gabriel Lucas
2018-03-16 12:59 ` Gabriel Lucas
2018-03-16 14:27 ` Denis Kenzior
2018-03-16 15:30 ` Gabriel LUCAS
2018-03-15 12:49 ` [PATCH 4/6] gemalto: handle sim is inserted or removed URCs Gabriel Lucas
2018-03-15 17:26 ` Denis Kenzior
2018-03-16 13:28 ` Gabriel Lucas
2018-03-16 14:03 ` Denis Kenzior [this message]
2018-03-19 15:57 ` Gabriel Lucas
2018-03-19 16:08 ` Denis Kenzior
2018-03-19 16:26 ` Gabriel Lucas
2018-03-19 17:10 ` Denis Kenzior
2018-03-20 8:37 ` Gabriel Lucas
2018-03-15 12:49 ` [PATCH 5/6] sim: give access to the driver Gabriel Lucas
2018-03-15 17:27 ` Denis Kenzior
2018-03-15 12:49 ` [PATCH 6/6] gemalto: fix sim reinsertion issue Gabriel Lucas
2018-03-15 17:29 ` Denis Kenzior
2018-03-16 13:30 ` Gabriel Lucas
2018-03-19 16:01 ` Gabriel Lucas
-- strict thread matches above, loose matches on Subject: below --
2018-03-12 13:19 [PATCH 3/6] gemalto: acquire the network technology Gabriel Lucas
2018-03-12 13:19 ` [PATCH 4/6] gemalto: handle sim is inserted or removed URCs Gabriel Lucas
2018-03-12 13:12 [PATCH 3/6] gemalto: acquire the network technology Gabriel Lucas
2018-03-12 13:12 ` [PATCH 4/6] gemalto: handle sim is inserted or removed URCs Gabriel Lucas
2018-03-12 12:57 [PATCH 0/6] gemalto's ALS3 and PHS8P support Gabriel Lucas
2018-03-12 12:57 ` [PATCH 4/6] gemalto: handle sim is inserted or removed URCs Gabriel Lucas
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=3a3ffd63-06ca-a9e7-c523-650000dd4b59@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