diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2013-09-28 16:38:51 +0200 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2013-09-28 16:38:51 +0200 |
commit | fd051580b347b09bf43d1fab29cea3d58b113e09 (patch) | |
tree | df76485577c71a1435be41a1b6115f2fe4795263 /ss.c | |
parent | 233ef2c6769c1c833e89651ae5846e66a5097cfb (diff) | |
download | hardware_ril_samsung-ril-fd051580b347b09bf43d1fab29cea3d58b113e09.zip hardware_ril_samsung-ril-fd051580b347b09bf43d1fab29cea3d58b113e09.tar.gz hardware_ril_samsung-ril-fd051580b347b09bf43d1fab29cea3d58b113e09.tar.bz2 |
Check modem state before RIL requests and properly report it on crash
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'ss.c')
-rw-r--r-- | ss.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |