[PATCH] [RFC] Do the PIN check in SIMManager
Andrzej Zaborowski
andrew.zaborowski at intel.com
Mon Sep 7 19:41:42 PDT 2009
Hi Santtu,
2009/9/7 Santtu Lakkala <inz at inz.fi>:
> Andrzej Zaborowski wrote:
>> + for (i = 0; i < len; i++)
>> + if (!g_str_has_suffix(pin_required,
>> + at_sim_name[i].name))
>> + pin_type = at_sim_name[i].type;
>
> Should this be:
>> + for (i = 0; i < len; i++)
>> + if (g_str_has_suffix(pin_required,
>> + at_sim_name[i].name)) {
Ugh, yes, this was wrong but what I wanted was g_str_has_prefix() and
no break; so that the loop would effectively find the longest matching
prefix. I now replaced it with full strcmp() and made use of Denis'
newly added g_at_result_iter_next_unquoted_string call.
Maybe we should pass the PIN type as string instead of enum and allow
any name beside the 27.007-defined ones.
Regards,
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Do-the-PIN-check-in-SIMManager.patch
Type: text/x-patch
Size: 14126 bytes
Desc: not available
URL: <http://lists.ofono.org/pipermail/ofono/attachments/20090908/738f9234/attachment.bin>
More information about the ofono
mailing list