---
src/stk.c | 33 +++++++++++++++++++++++++++------
1 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/src/stk.c b/src/stk.c
index bc46b2f..c35f457 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -1981,6 +1981,7 @@ static void free_idle_mode_text(struct ofono_stk *stk)
memset(&stk->idle_mode_icon, 0, sizeof(stk->idle_mode_icon));
}
+/* Note: may be called from ofono_stk_proactive_command_handled_notify */
static gboolean handle_command_refresh(const struct stk_command *cmd,
struct stk_response *rsp,
struct ofono_stk *stk)
@@ -2025,7 +2026,8 @@ static gboolean handle_command_refresh(const struct stk_command
*cmd,
default:
ofono_info("Undefined Refresh qualifier: %d", cmd->qualifier);
- rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
+ if (rsp != NULL)
+ rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
return TRUE;
}
@@ -2048,11 +2050,18 @@ static gboolean handle_command_refresh(const struct stk_command
*cmd,
sim = __ofono_atom_get_data(sim_atom);
if (sim == NULL) {
- rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
+ if (rsp != NULL)
+ rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
return TRUE;
}
- if (cmd->qualifier < 4) {
+ /*
+ * For now we can handle the Refresh types that don't require
+ * a SIM reset except if that part of the task has been already
+ * handled by modem firmware (indicated by rsp == NULL) in which
+ * case we just restart our SIM initialisation.
+ */
+ if (cmd->qualifier < 4 || rsp == NULL) {
int qualifier = stk->pending_cmd->qualifier;
GSList *file_list = stk->pending_cmd->refresh.file_list;
@@ -2062,10 +2071,15 @@ static gboolean handle_command_refresh(const struct stk_command
*cmd,
/*
* Queue the TERMINAL RESPONSE before triggering potential
* file accesses.
+ *
+ * TODO: Find out if we need to send the "Refresh performed
+ * with additional EFs read" response.
*/
- err = stk_respond(stk, rsp, stk_command_cb);
- if (err)
- stk_command_cb(&failure, stk);
+ if (rsp != NULL) {
+ err = stk_respond(stk, rsp, stk_command_cb);
+ if (err)
+ stk_command_cb(&failure, stk);
+ }
/* TODO: use the alphaId / icon */
/* TODO: if AID is supplied, check its value */
@@ -2084,6 +2098,9 @@ static gboolean handle_command_refresh(const struct stk_command
*cmd,
break;
case 2:
case 3:
+ case 4:
+ case 5:
+ case 6:
free_idle_mode_text(stk);
__ofono_sim_refresh(sim, file_list, FALSE, TRUE);
break;
@@ -2779,6 +2796,10 @@ void ofono_stk_proactive_command_handled_notify(struct ofono_stk
*stk,
&cmd->send_dtmf.text_attr,
&cmd->send_dtmf.icon_id);
break;
+
+ case STK_COMMAND_TYPE_REFRESH:
+ handle_command_refresh(stk->pending_cmd, NULL, stk);
+ break;
}
stk_command_free(cmd);
--
1.7.1.86.g0e460.dirty
Show replies by date
As noted on IRC.
---
AUTHORS | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index d9f0434..046907a 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -46,14 +46,12 @@ Rafael Ignacio Zurita <rafael.zurita(a)profusion.mobi>
Helen Clemson <helen.clemson(a)stericsson.com>
Jessica Nilsson <jessica.j.nilsson(a)stericsson.com>
Oleg Zhurakivskyy <oleg.zhurakivskyy(a)nokia.com>
-Rafael Ignacio Zurita <rafael.zurita(a)profusion.mobi>
Lasse Kunnasluoto <lasse.kunnasluoto(a)tieto.com>
John Mathew <john.mathew(a)elektrobit.com>
BenoƮt Monin <benoit.monin(a)gmx.fr>
Dara Spieker-Doyle <dara.spieker-doyle(a)nokia.com>
Neil Jerram <neil(a)ossau.uklinux.net>
Lei Yu <lei.2.yu(a)nokia.com>
-Lasse Kunnasluoto <lasse.kunnasluoto(a)tieto.com>
Oskari Timperi <oskari.timperi(a)iki.fi>
Faiyaz Baxamusa <faiyaz.baxamusa(a)nokia.com>
Jussi Kangas <jussi.kangas(a)tieto.com>
--
1.7.1.86.g0e460.dirty
Hi Andrew,
On 02/19/2011 04:00 AM, Andrzej Zaborowski wrote:
As noted on IRC.
---
AUTHORS | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
Patch has been applied, thanks.
Regards,
-Denis
Hi Andrew,
On 02/19/2011 04:00 AM, Andrzej Zaborowski wrote:
---
src/stk.c | 33 +++++++++++++++++++++++++++------
1 files changed, 27 insertions(+), 6 deletions(-)
Patch has been applied, thanks.
Regards,
-Denis