From: Philippe Nunes <philippe.nunes@linux.intel.com>
To: ofono@ofono.org
Subject: Re: [PATCH v3 2/7] stk: Introduce BIP command handlers
Date: Tue, 17 May 2011 11:55:26 +0200 [thread overview]
Message-ID: <4DD2460E.9050401@linux.intel.com> (raw)
In-Reply-To: <BANLkTin0K_wovwFOsmkO2JUhODC+H=O2yw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2336 bytes --]
Hi Andrew,
>> +
>> + stk->tx_buffer.data.array = g_try_malloc(oc->buf_size);
>> + if (stk->tx_buffer.data.array == NULL) {
>> + rsp.result.type = STK_RESULT_TYPE_NOT_CAPABLE;
>> + goto out;
>> + }
>
> A minor nitpick: we tend to return one of the temporary error codes
> when out of memory.
>
OK, I will return in this case the general result
"STK_RESULT_TYPE_TERMINAL_BUSY" with the additional info "no specific
cause".
>> +static void confirm_open_channel_cb(enum stk_agent_result result,
>> + gboolean confirm,
>> + void *user_data)
>> +{
>> + struct ofono_stk *stk = user_data;
>> +
>> + switch (result) {
>> + case STK_AGENT_RESULT_TERMINATE:
>> + send_simple_response(stk, STK_RESULT_TYPE_USER_TERMINATED);
>> + return;
>> +
>> + case STK_AGENT_RESULT_TIMEOUT:
>> + confirm = FALSE;
>> + /* Fall through */
>> +
>> + case STK_AGENT_RESULT_OK:
>> + if (confirm)
>> + break;
>> + /* Fall through */
>
> According to 6.4.27 we should return STK_RESULT_TYPE_USER_REJECT if
> the user does not accept the channel setup.
>
>> +
>> + default:
>> + send_simple_response(stk, STK_RESULT_TYPE_TERMINAL_BUSY);
>> + return;
>> + }
>
> I think Jeevaka determined that this needs an additional info field.
In practice, I applied the same code than "confirm_launch_browser_cb".
But you're right, for Open channel, we should return the terminal
response "User did not accept the proactive command".
For the additional info field, I just simplified the code seen in
"confirm_launch_browser_cb" as in this case, no specific cause is given.
But your remark is true, it is mandatory to return an additional
information in case of general result "STK_RESULT_TYPE_TERMINAL_BUSY".
To clean both issues you raised and for an homogeneous behavior, I
propose to follow the code written in "confirm_call_cb".Thus, in case of
no answer, I will return STK_RESULT_TYPE_USER_TERMINATED and not
STK_RESULT_TYPE_TERMINAL_BUSY.
Thank you for your review.
Best regards,
Philippe.
next prev parent reply other threads:[~2011-05-17 9:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 17:21 [PATCH v3 1/7] stk: Clear 'respond_on_exit' flag after sending the terminal response Philippe Nunes
2011-05-13 17:21 ` [PATCH v3 2/7] stk: Introduce BIP command handlers Philippe Nunes
2011-05-16 15:54 ` Andrzej Zaborowski
2011-05-17 9:55 ` Philippe Nunes [this message]
2011-05-13 17:22 ` [PATCH v3 3/7] gprs: Add 'stk' gprs context type Philippe Nunes
2011-05-13 17:22 ` [PATCH v3 4/7] gprs: Add private APIs for adding/activating/removing hidden PDP contexts Philippe Nunes
2011-05-13 17:22 ` [PATCH v3 5/7] stk: Use Gprs private APIs to handle the Open channel/Close Channel Philippe Nunes
2011-05-13 17:22 ` [PATCH v3 6/7] gprs: Add a host route for STK context type Philippe Nunes
2011-05-13 17:22 ` [PATCH v3 7/7] stk: Add support of the Setup event list proactive command Philippe Nunes
2011-05-16 17:00 ` Andrzej Zaborowski
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=4DD2460E.9050401@linux.intel.com \
--to=philippe.nunes@linux.intel.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.