summaryrefslogtreecommitdiffstats
path: root/src/stk.c
diff options
context:
space:
mode:
authorGuillaume Lucas <guillaumex.lucas@intel.com>2010-11-30 13:21:50 +0000
committerDenis Kenzior <denkenz@gmail.com>2010-11-30 08:20:42 -0600
commit8b0307a6218fccb9be5a1e099699b2e96c784392 (patch)
tree7ed51435690c8842d720274be954557c397bed0a /src/stk.c
parent5154d5e38de1c44856da34377b63e590ad69b7d6 (diff)
downloadofono-8b0307a6218fccb9be5a1e099699b2e96c784392.tar.bz2
stk: Add busy error for the display text command
According to the sequence 1.2 of the ETSI TS 102 384 a busy screen error should be returns for the display text proactive command when the ME is not able to display the text.
Diffstat (limited to 'src/stk.c')
-rw-r--r--src/stk.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/stk.c b/src/stk.c
index a4abb7d3..7b39f7e1 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -1203,6 +1203,9 @@ static void display_text_cb(enum stk_agent_result result, void *user_data)
{
struct ofono_stk *stk = user_data;
gboolean confirm;
+ struct stk_response rsp;
+ static unsigned char screen_busy_result[] = { 0x01 };
+ static struct ofono_error error = { .type = OFONO_ERROR_TYPE_FAILURE };
stk->respond_on_exit = FALSE;
@@ -1250,6 +1253,15 @@ static void display_text_cb(enum stk_agent_result result, void *user_data)
STK_RESULT_TYPE_NO_RESPONSE : STK_RESULT_TYPE_SUCCESS);
break;
+ case STK_AGENT_RESULT_BUSY:
+ memset(&rsp, 0, sizeof(rsp));
+ rsp.result.type = STK_RESULT_TYPE_TERMINAL_BUSY;
+ rsp.result.additional_len = sizeof(screen_busy_result);
+ rsp.result.additional = screen_busy_result;
+ if (stk_respond(stk, &rsp, stk_command_cb))
+ stk_command_cb(&error, stk);
+ break;
+
case STK_AGENT_RESULT_TERMINATE:
default:
send_simple_response(stk, STK_RESULT_TYPE_USER_TERMINATED);
@@ -1366,6 +1378,7 @@ static void request_confirmation_cb(enum stk_agent_result result,
break;
case STK_AGENT_RESULT_TERMINATE:
+ default:
send_simple_response(stk, STK_RESULT_TYPE_USER_TERMINATED);
break;
}
@@ -1408,6 +1421,7 @@ static void request_key_cb(enum stk_agent_result result, char *string,
break;
case STK_AGENT_RESULT_TERMINATE:
+ default:
send_simple_response(stk, STK_RESULT_TYPE_USER_TERMINATED);
break;
}
@@ -1505,6 +1519,7 @@ static void request_string_cb(enum stk_agent_result result, char *string,
break;
case STK_AGENT_RESULT_TERMINATE:
+ default:
send_simple_response(stk, STK_RESULT_TYPE_USER_TERMINATED);
break;
}