summaryrefslogtreecommitdiffstats
path: root/src/stk.c
diff options
context:
space:
mode:
authorPhilippe Nunes <philippe.nunes@linux.intel.com>2012-08-28 15:33:52 +0200
committerDenis Kenzior <denkenz@gmail.com>2012-08-30 16:36:49 -0500
commitec6269e59b45ee6efe1dfdc345ed1d3b135b82db (patch)
treebfe6a77f728bd00b10938e47247443481f58a76d /src/stk.c
parent03c4ccfd59cde5e7ffa9fb5e518ebd7df23a77f0 (diff)
downloadofono-ec6269e59b45ee6efe1dfdc345ed1d3b135b82db.tar.bz2
stk: Display action information while sending USSD
Diffstat (limited to 'src/stk.c')
-rw-r--r--src/stk.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/stk.c b/src/stk.c
index 7a7bd758..b4714467 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -2021,11 +2021,6 @@ static gboolean handle_command_send_ussd(const struct stk_command *cmd,
cmd->send_ussd.ussd_string.len,
send_ussd_callback, stk);
- if (err >= 0) {
- stk->cancel_cmd = send_ussd_cancel;
-
- return FALSE;
- }
if (err == -ENOSYS) {
rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
@@ -2038,6 +2033,20 @@ static gboolean handle_command_send_ussd(const struct stk_command *cmd,
return TRUE;
}
+ if (err < 0) {
+ unsigned char no_cause_result[] = { 0x00 };
+
+ /*
+ * We most likely got an out of memory error, tell SIM
+ * to retry
+ */
+ ADD_ERROR_RESULT(rsp->result, STK_RESULT_TYPE_TERMINAL_BUSY,
+ no_cause_result);
+ return TRUE;
+ }
+
+ stk->cancel_cmd = send_ussd_cancel;
+
stk_alpha_id_set(stk, cmd->send_ussd.alpha_id,
&cmd->send_ussd.text_attr,
&cmd->send_ussd.icon_id);