[PATCH] Add parser for file list objects

Gu, Yang yang.gu at intel.com
Mon Mar 22 20:28:05 PDT 2010


Hi,
	Attached is the patch modified according to the comments. Please review!

>> +
>> +		if ((data[i] == 0x2f) || (data[i] == 0x6f) ||
>> +						(data[i] == 0x4f)) {
>> +			sf = g_try_new0(struct stk_file, 1);
>> +			if (sf == NULL)
>> +				goto error;
>> +
>> +			sf->len = i - start;
>> +			memcpy(sf->file, data + start, i - start);
>> +			*fl = g_slist_prepend(*fl, sf);
>
>This looks wrong, you're not including the EF file type byte / 2nd byte in the
>file contents.
>>
>> +/* Define the struct of single file in TS102.223 Section 8.18 */
>> +struct stk_file {
>> +	unsigned char file[8];
>
>Please put a comment here why it is 8, preferably quoting or referencing the
>right right section from the specification.
>
>> +	unsigned int len;
>> +};
>> +
>>  /*
>>   * According to 102.223 Section 8.72 the length of text attribute CTLV is
>>  1 * byte.  This means that the maximum size is 127 according to the rules
>>
>
>Regards,
>-Denis


Regards,
-Yang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-parser-for-file-list-objects.patch
Type: application/octet-stream
Size: 4077 bytes
Desc: 0001-Add-parser-for-file-list-objects.patch
URL: <http://lists.ofono.org/pipermail/ofono/attachments/20100323/9e1ee1da/attachment.obj>


More information about the ofono mailing list