From: Philippe Nunes <philippe.nunes@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH v4 1/8] stk: Clear 'respond_on_exit' flag after sending the terminal response
Date: Fri, 20 May 2011 18:26:14 +0200 [thread overview]
Message-ID: <1305908781-8322-1-git-send-email-philippe.nunes@linux.intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4288 bytes --]
---
src/stk.c | 27 ++-------------------------
1 files changed, 2 insertions(+), 25 deletions(-)
diff --git a/src/stk.c b/src/stk.c
index c86cbfb..8214b65 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -128,6 +128,7 @@ static int stk_respond(struct ofono_stk *stk, struct stk_response *rsp,
stk_command_free(stk->pending_cmd);
stk->pending_cmd = NULL;
stk->cancel_cmd = NULL;
+ stk->respond_on_exit = FALSE;
stk->driver->terminal_response(stk, tlv_len, tlv, cb, stk);
@@ -477,10 +478,8 @@ static void user_termination_cb(enum stk_agent_result result, void *user_data)
{
struct ofono_stk *stk = user_data;
- if (result == STK_AGENT_RESULT_TERMINATE) {
- stk->respond_on_exit = FALSE;
+ if (result == STK_AGENT_RESULT_TERMINATE)
send_simple_response(stk, STK_RESULT_TYPE_USER_TERMINATED);
- }
}
static void stk_alpha_id_set(struct ofono_stk *stk,
@@ -598,7 +597,6 @@ static void default_agent_notify(gpointer user_data)
stk->default_agent = NULL;
stk->current_agent = stk->session_agent;
- stk->respond_on_exit = FALSE;
}
static void session_agent_notify(gpointer user_data)
@@ -617,7 +615,6 @@ static void session_agent_notify(gpointer user_data)
stk->session_agent = NULL;
stk->current_agent = stk->default_agent;
- stk->respond_on_exit = FALSE;
if (stk->remove_agent_source) {
g_source_remove(stk->remove_agent_source);
@@ -1159,8 +1156,6 @@ static void request_selection_cb(enum stk_agent_result result, uint8_t id,
{
struct ofono_stk *stk = user_data;
- stk->respond_on_exit = FALSE;
-
switch (result) {
case STK_AGENT_RESULT_OK:
{
@@ -1243,8 +1238,6 @@ static void display_text_cb(enum stk_agent_result result, void *user_data)
static unsigned char screen_busy_result[] = { 0x01 };
static struct ofono_error error = { .type = OFONO_ERROR_TYPE_FAILURE };
- stk->respond_on_exit = FALSE;
-
/*
* There are four possible paths for DisplayText with immediate
* response flag set:
@@ -1386,8 +1379,6 @@ static void request_confirmation_cb(enum stk_agent_result result,
struct stk_command_get_inkey *cmd = &stk->pending_cmd->get_inkey;
struct stk_response rsp;
- stk->respond_on_exit = FALSE;
-
switch (result) {
case STK_AGENT_RESULT_OK:
memset(&rsp, 0, sizeof(rsp));
@@ -1442,8 +1433,6 @@ static void request_key_cb(enum stk_agent_result result, char *string,
struct stk_command_get_inkey *cmd = &stk->pending_cmd->get_inkey;
struct stk_response rsp;
- stk->respond_on_exit = FALSE;
-
switch (result) {
case STK_AGENT_RESULT_OK:
memset(&rsp, 0, sizeof(rsp));
@@ -1560,8 +1549,6 @@ static void request_string_cb(enum stk_agent_result result, char *string,
gboolean packed = (qualifier & (1 << 3)) != 0;
struct stk_response rsp;
- stk->respond_on_exit = FALSE;
-
switch (result) {
case STK_AGENT_RESULT_OK:
memset(&rsp, 0, sizeof(rsp));
@@ -1699,8 +1686,6 @@ static void confirm_call_cb(enum stk_agent_result result, gboolean confirm,
struct stk_response rsp;
int err;
- stk->respond_on_exit = FALSE;
-
switch (result) {
case STK_AGENT_RESULT_TIMEOUT:
confirm = FALSE;
@@ -2283,8 +2268,6 @@ static void send_dtmf_cancel(struct ofono_stk *stk)
struct ofono_voicecall *vc = NULL;
struct ofono_atom *vc_atom;
- stk->respond_on_exit = FALSE;
-
vc_atom = __ofono_modem_find_atom(__ofono_atom_get_modem(stk->atom),
OFONO_ATOM_TYPE_VOICECALL);
if (vc_atom)
@@ -2300,8 +2283,6 @@ static void dtmf_sent_cb(int error, void *user_data)
{
struct ofono_stk *stk = user_data;
- stk->respond_on_exit = FALSE;
-
stk_alpha_id_unset(stk);
if (error == ENOENT) {
@@ -2413,8 +2394,6 @@ static void play_tone_cb(enum stk_agent_result result, void *user_data)
{
struct ofono_stk *stk = user_data;
- stk->respond_on_exit = FALSE;
-
switch (result) {
case STK_AGENT_RESULT_OK:
case STK_AGENT_RESULT_TIMEOUT:
@@ -2547,8 +2526,6 @@ static void confirm_launch_browser_cb(enum stk_agent_result result,
struct ofono_error failure = { .type = OFONO_ERROR_TYPE_FAILURE };
struct stk_response rsp;
- stk->respond_on_exit = FALSE;
-
switch (result) {
case STK_AGENT_RESULT_TIMEOUT:
confirm = FALSE;
--
1.7.1
next reply other threads:[~2011-05-20 16:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-20 16:26 Philippe Nunes [this message]
2011-05-20 16:26 ` [PATCH v4 2/8] stk: Introduce BIP command handlers Philippe Nunes
2011-06-02 0:28 ` Denis Kenzior
2011-06-10 14:03 ` Philippe Nunes
2011-06-08 8:01 ` Denis Kenzior
2011-05-20 16:26 ` [PATCH v4 3/8] gprs: Add 'stk' gprs context type Philippe Nunes
2011-06-01 5:30 ` Denis Kenzior
2011-05-20 16:26 ` [PATCH v4 4/8] gprs: Add private APIs for adding/activating/removing hidden PDP contexts Philippe Nunes
2011-06-01 6:18 ` Denis Kenzior
2011-06-10 9:44 ` Philippe Nunes
2011-06-08 7:46 ` Denis Kenzior
2011-05-20 16:26 ` [PATCH v4 5/8] stk: Use Gprs private APIs to handle the Open channel/Close Channel Philippe Nunes
2011-05-20 16:26 ` [PATCH v4 6/8] gprs: Add a host route for STK context type Philippe Nunes
2011-06-01 6:26 ` Denis Kenzior
2011-05-20 16:26 ` [PATCH v4 7/8] stk: Add support of the Setup event list proactive command Philippe Nunes
2011-05-20 16:26 ` [PATCH v4 8/8] stk: Add read/write handlers Philippe Nunes
2011-06-01 5:26 ` [PATCH v4 1/8] stk: Clear 'respond_on_exit' flag after sending the terminal response 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=1305908781-8322-1-git-send-email-philippe.nunes@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox