From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [RfC][PATCH 1/3] stk: API for SMS Point-to-Point download to UICC
Date: Mon, 08 Nov 2010 13:47:24 -0600 [thread overview]
Message-ID: <4CD853CC.9030908@gmail.com> (raw)
In-Reply-To: <1289151740-9922-1-git-send-email-andrew.zaborowski@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]
Hi Andrew,
On 11/07/2010 11:42 AM, Andrzej Zaborowski wrote:
> The callback returns the TP-User-Data element content of the RP-ACK or
> RP-ERROR message, returned by the UICC.
> ---
> src/ofono.h | 8 ++++++++
> src/stk.c | 39 +++++++++++++++++++++++++++++++++++++++
> 2 files changed, 47 insertions(+), 0 deletions(-)
>
> +int __ofono_sms_sim_download(struct ofono_stk *stk, const struct sms *msg,
> + __ofono_sms_sim_download_cb_t cb, void *data)
> +{
> + struct stk_envelope e;
> +
> + if (msg->type != SMS_TYPE_DELIVER)
> + return -EINVAL;
> +
> + DBG("");
> +
> + memset(&e, 0, sizeof(e));
> +
> + e.type = STK_ENVELOPE_TYPE_SMS_PP_DOWNLOAD;
> + e.src = STK_DEVICE_IDENTITY_TYPE_NETWORK;
> +
> + e.sms_pp_download.address.number = (char *) msg->sc_addr.address;
> + e.sms_pp_download.address.ton_npi = msg->sc_addr.numbering_plan |
> + (msg->sc_addr.number_type << 4);
> + memcpy(&e.sms_pp_download.message, &msg->deliver, sizeof(msg->deliver));
> +
> + stk->sms_pp_cb = cb;
> + stk->sms_pp_userdata = data;
Please note that this has a possibility of overwriting the sms_pp_cb and
sms_pp_userdata if multiple SMS-PP sms messages are received (and
acknowledged) in short succession.
However, I assume you already thought of this and will take care of it
with the async ack task.
Patch has been applied, thanks.
Regards,
-Denis
prev parent reply other threads:[~2010-11-08 19:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-07 17:42 [RfC][PATCH 1/3] stk: API for SMS Point-to-Point download to UICC Andrzej Zaborowski
2010-11-07 17:42 ` [PATCH 2/3] sms: Handle "USIM Download" SMS type Andrzej Zaborowski
2010-11-08 19:47 ` Denis Kenzior
2010-11-07 17:42 ` [PATCH 3/3] Update TODO Andrzej Zaborowski
2010-11-08 19:49 ` Denis Kenzior
2010-11-08 19:47 ` Denis Kenzior [this message]
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=4CD853CC.9030908@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.