summaryrefslogtreecommitdiffstats
path: root/ss.c
diff options
context:
space:
mode:
Diffstat (limited to 'ss.c')
-rw-r--r--ss.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ss.c b/ss.c
index 4ccd868..d05fa2f 100644
--- a/ss.c
+++ b/ss.c
@@ -56,6 +56,9 @@ void ril_request_send_ussd(RIL_Token t, void *data, size_t length)
if (data == NULL || length < (int) sizeof(char *))
goto error;
+ if (ril_radio_state_complete(RADIO_STATE_OFF, t))
+ return;
+
switch (ril_data.state.ussd_state) {
case 0:
case IPC_SS_USSD_NO_ACTION_REQUIRE:
@@ -140,6 +143,9 @@ void ril_request_cancel_ussd(RIL_Token t, void *data, size_t length)
{
struct ipc_ss_ussd ussd;
+ if (ril_radio_state_complete(RADIO_STATE_OFF, t))
+ return;
+
memset(&ussd, 0, sizeof(ussd));
ussd.state = IPC_SS_USSD_TERMINATED_BY_NET;