On Fri, Mar 9, 2012 at 9:30 AM, Nathan Williams <[email protected]> wrote:

> On Fri, Mar 9, 2012 at 8:19 AM, Aleksander Morgado 
> <[email protected]>wrote:
>
>> A possible fix to handle the case where we don't know how much we can
>
> read would be to try to read the first bytes of the record (3 or 4 or 5
>> just in case) to get the full record length of the record, assuming 1-3
>> bytes max for the size field, so we read "A3" + size encoded in 1 or 2
>> or 3 bytes + "80"); and once we know the whole record size, read the
>> exact list size.
>>
>
> Yeah, I thought about this, but had hoped to avoid it (If the record is
> present at all, there will be a minimum of 7 bytes - A3058003FFFFFF -  so I
> think that's the right amount for an initial read).
>
>
Here's a version that does the 7-then-more retry. It works on my SIM
(retrying from 7 to 34 bytes, even though the entries are all FFFFFF); see
what you think.

    - Nathan

Attachment: 0001-Fetch-parse-and-plumb-up-the-SPDI-information-from-t.patch
Description: Binary data

_______________________________________________
networkmanager-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to