From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 4/4] stk: Partially handle Refresh command.
Date: Mon, 07 Feb 2011 13:56:36 -0600 [thread overview]
Message-ID: <4D504E74.1000600@gmail.com> (raw)
In-Reply-To: <1296782434-11008-4-git-send-email-andrew.zaborowski@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]
Hi Andrew,
> @@ -2030,6 +2042,59 @@ static gboolean handle_command_refresh(const struct stk_command *cmd,
> cmd->refresh.icon_id.qualifier);
> DBG("Alpha ID: %s", cmd->refresh.alpha_id);
>
> + sim_atom = __ofono_modem_find_atom(__ofono_atom_get_modem(stk->atom),
> + OFONO_ATOM_TYPE_SIM);
> + if (sim_atom)
> + sim = __ofono_atom_get_data(sim_atom);
> +
> + if (sim == NULL) {
> + rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
> + return TRUE;
> + }
> +
> + if (cmd->qualifier < 4) {
> + int qualifier = stk->pending_cmd->qualifier;
> + GSList *file_list = stk->pending_cmd->refresh.file_list;
> +
> + /* Don't free the list yet */
> + stk->pending_cmd->refresh.file_list = NULL;
> +
> + /*
> + * Queue the TERMINAL RESPONSE before triggering potential
> + * file accesses.
> + */
> + err = stk_respond(stk, rsp, stk_command_cb);
> + if (err)
> + stk_command_cb(&failure, stk);
So my question here is should we delay calling refresh until after our
terminal response has been accepted?
> +
> + /* TODO: use the alphaId / icon */
> + /* TODO: if AID is supplied, check its value */
> + /* TODO: possibly check if a D-bus call is pending or
> + * an STK session ongoing. */
> +
> + /* TODO: free some elements of the atom state */
> +
> + switch (qualifier) {
> + case 0:
> + free_idle_mode_text(stk);
> + __ofono_sim_refresh(sim, file_list, TRUE, TRUE);
> + break;
> + case 1:
> + __ofono_sim_refresh(sim, file_list, FALSE, FALSE);
> + break;
> + case 2:
> + case 3:
> + free_idle_mode_text(stk);
> + __ofono_sim_refresh(sim, file_list, FALSE, TRUE);
> + break;
> + }
> +
> + g_slist_foreach(file_list, (GFunc) g_free, NULL);
> + g_slist_free(file_list);
> +
> + return FALSE;
> + }
> +
> rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
> return TRUE;
> }
Should we be handling the case where refresh is notified via
ofono_stk_proactive_command_handled_notify as well?
Regards,
-Denis
next prev parent reply other threads:[~2011-02-07 19:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-04 1:20 [PATCH 1/4] Add SIM filesystem watch api Andrzej Zaborowski
2011-02-04 1:20 ` [PATCH 2/4] sim: Implement file watching and basic refresh Andrzej Zaborowski
2011-02-07 19:34 ` Denis Kenzior
2011-02-07 20:56 ` Andrzej Zaborowski
2011-02-07 21:13 ` Denis Kenzior
2011-02-08 0:13 ` Andrzej Zaborowski
2011-02-08 1:25 ` Denis Kenzior
2011-02-08 2:22 ` Andrzej Zaborowski
2011-02-08 2:44 ` Denis Kenzior
2011-02-04 1:20 ` [PATCH 3/4] Watch files that ofono keeps in memory Andrzej Zaborowski
2011-02-04 1:20 ` [PATCH 4/4] stk: Partially handle Refresh command Andrzej Zaborowski
2011-02-07 19:56 ` Denis Kenzior [this message]
2011-02-07 19:48 ` [PATCH 1/4] Add SIM filesystem watch api Denis Kenzior
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=4D504E74.1000600@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox