summaryrefslogtreecommitdiffstats
path: root/sms.c
diff options
context:
space:
mode:
Diffstat (limited to 'sms.c')
-rw-r--r--sms.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sms.c b/sms.c
index 3b9a713..0b30f6e 100644
--- a/sms.c
+++ b/sms.c
@@ -361,6 +361,9 @@ void ril_request_send_sms(RIL_Token t, void *data, size_t length)
if (data == NULL || length < (int) (2 * sizeof(char *)))
goto error;
+ if (ril_radio_state_complete(RADIO_STATE_OFF, t))
+ return;
+
pdu = ((char **) data)[1];
smsc = ((unsigned char **) data)[0];
pdu_length = 0;
@@ -668,6 +671,9 @@ void ril_request_sms_acknowledge(RIL_Token t, void *data, size_t length)
if (data == NULL || length < 2 * sizeof(int))
goto error;
+ if (ril_radio_state_complete(RADIO_STATE_OFF, t))
+ return;
+
success = ((int *) data)[0];
fail_cause = ((int *) data)[1];
@@ -732,6 +738,9 @@ void ril_request_write_sms_to_sim(RIL_Token token, void *data, size_t size)
if (data == NULL || size < sizeof(RIL_SMS_WriteArgs))
goto error;
+ if (ril_radio_state_complete(RADIO_STATE_OFF, token))
+ return;
+
args = (RIL_SMS_WriteArgs *) data;
if (args->pdu != NULL) {
@@ -808,6 +817,9 @@ void ril_request_delete_sms_on_sim(RIL_Token token, void *data, size_t size)
if (data == NULL || size < sizeof(index))
goto error;
+ if (ril_radio_state_complete(RADIO_STATE_OFF, token))
+ return;
+
index = *((int *) data);
if (index <= 0 || index > 0xffff)