Hi Yang,
> ---
> src/stkutil.c | 24 ++++++++++++++++++++++++
> 1 files changed, 24 insertions(+), 0 deletions(-)
>
> diff --git a/src/stkutil.c b/src/stkutil.c
> index a6b0284..3e423b5 100644
> --- a/src/stkutil.c
> +++ b/src/stkutil.c
> @@ -549,6 +549,28 @@ static gboolean parse_dataobj_location_info(
> return TRUE;
> }
>
> +/* Defined in TS 102.223 Section 8.20 */
> +static gboolean parse_dataobj_imei(struct comprehension_tlv_iter *iter,
> + void *user)
> +{
> + char **imei = user;
So this one implies character data (e.g. string), but...
> + const unsigned char *data;
> + unsigned int len;
> +
> + if (comprehension_tlv_iter_get_tag(iter) !=
> + STK_DATA_OBJECT_TYPE_IMEI)
> + return FALSE;
> +
> + len = comprehension_tlv_iter_get_length(iter);
> + if (len != 8)
> + return FALSE;
> +
> + data = comprehension_tlv_iter_get_data(iter);
> + memcpy(*imei, data, len);
Here you copy binary data into a string array. Since IMEI is essentially bcd
encoded I suggest you parse it into string form here.
> +
> + return TRUE;
> +}
> +
Regards,
-Denis
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono