summaryrefslogtreecommitdiffstats
path: root/src/stk.c
diff options
context:
space:
mode:
authorJeevaka Badrappan <jeevaka.badrappan@elektrobit.com>2010-09-30 23:32:57 -0700
committerDenis Kenzior <denkenz@gmail.com>2010-10-02 17:20:08 -0500
commitdac67fe3637091b33f70f8e5e7094fab30cd62ee (patch)
tree514ff97708906aac8c3727652ede1f718bd2410e /src/stk.c
parent17f7fffa2a0b5b3d3f92a7cd69c59713ad2d2544 (diff)
downloadofono-dac67fe3637091b33f70f8e5e7094fab30cd62ee.tar.bz2
stk: Additional info for failed Send USSD case
Diffstat (limited to 'src/stk.c')
-rw-r--r--src/stk.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/stk.c b/src/stk.c
index bbbc4fd3..80b4d23e 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -1621,6 +1621,7 @@ static void send_ussd_callback(int error, int dcs, const unsigned char *msg,
struct ofono_error failure = { .type = OFONO_ERROR_TYPE_FAILURE };
struct stk_response rsp;
enum sms_charset charset;
+ unsigned char no_cause[] = { 0x00 };
if (stk->pending_cmd->send_ussd.alpha_id &&
stk->pending_cmd->send_ussd.alpha_id[0])
@@ -1661,7 +1662,13 @@ static void send_ussd_callback(int error, int dcs, const unsigned char *msg,
break;
default:
- send_simple_response(stk, STK_RESULT_TYPE_USSD_RETURN_ERROR);
+ rsp.result.type = STK_RESULT_TYPE_USSD_RETURN_ERROR;
+ rsp.result.additional_len = sizeof(no_cause);
+ rsp.result.additional = no_cause;
+
+ if (stk_respond(stk, &rsp, stk_command_cb))
+ stk_command_cb(&failure, stk);
+
break;
}
}