summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/stk.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/stk.c b/src/stk.c
index eb31b0f8..e9a284b2 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -1039,8 +1039,6 @@ static gboolean handle_command_select_item(const struct stk_command *cmd,
return TRUE;
}
- stk->cancel_cmd = stk_request_cancel;
-
/* We most likely got an out of memory error, tell SIM to retry */
if (stk_agent_request_selection(stk->current_agent,
stk->select_item_menu,
@@ -1051,6 +1049,8 @@ static gboolean handle_command_select_item(const struct stk_command *cmd,
return TRUE;
}
+ stk->cancel_cmd = stk_request_cancel;
+
return FALSE;
}
@@ -1138,8 +1138,6 @@ static gboolean handle_command_display_text(const struct stk_command *cmd,
}
}
- stk->cancel_cmd = stk_request_cancel;
-
/* We most likely got an out of memory error, tell SIM to retry */
if (stk_agent_display_text(stk->current_agent, dt->text, 0, priority,
display_text_cb, stk,
@@ -1153,6 +1151,9 @@ static gboolean handle_command_display_text(const struct stk_command *cmd,
DBG("Immediate Response: %d", stk->immediate_response);
+ if (stk->immediate_response == FALSE)
+ stk->cancel_cmd = stk_request_cancel;
+
return stk->immediate_response;
}
@@ -1293,8 +1294,6 @@ static gboolean handle_command_get_inkey(const struct stk_command *cmd,
gettimeofday(&stk->get_inkey_start_ts, NULL);
- stk->cancel_cmd = stk_request_cancel;
-
if (yesno)
err = stk_agent_request_confirmation(stk->current_agent,
gi->text, icon_id,
@@ -1318,6 +1317,8 @@ static gboolean handle_command_get_inkey(const struct stk_command *cmd,
return TRUE;
}
+ stk->cancel_cmd = stk_request_cancel;
+
return FALSE;
}
@@ -1370,8 +1371,6 @@ static gboolean handle_command_get_input(const struct stk_command *cmd,
uint8_t icon_id = 0;
int err;
- stk->cancel_cmd = stk_request_cancel;
-
if (alphabet)
err = stk_agent_request_input(stk->current_agent, gi->text,
icon_id, gi->default_text, ucs2,
@@ -1396,6 +1395,8 @@ static gboolean handle_command_get_input(const struct stk_command *cmd,
return TRUE;
}
+ stk->cancel_cmd = stk_request_cancel;
+
return FALSE;
}
@@ -1563,8 +1564,6 @@ static gboolean handle_command_set_up_call(const struct stk_command *cmd,
return TRUE;
}
- stk->cancel_cmd = stk_request_cancel;
-
err = stk_agent_confirm_call(stk->current_agent, sc->alpha_id_usr_cfm,
0, confirm_call_cb, stk, NULL,
stk->timeout * 1000);
@@ -1578,6 +1577,8 @@ static gboolean handle_command_set_up_call(const struct stk_command *cmd,
return TRUE;
}
+ stk->cancel_cmd = stk_request_cancel;
+
return FALSE;
}