[Replicant] [PATCH 1/3] ril_radio_state_check: rename it to increase clarity.

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Tue Jun 25 13:57:45 UTC 2019


The former name of the function doesn't convey what it's
supposed to do.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 call.c        | 14 +++++++-------
 data.c        | 10 +++++-----
 misc.c        | 10 +++++-----
 network.c     | 32 ++++++++++++++++----------------
 samsung-ril.c |  8 ++++++--
 samsung-ril.h |  2 +-
 sim.c         | 26 +++++++++++++-------------
 sms.c         |  6 +++---
 ss.c          |  4 ++--
 9 files changed, 58 insertions(+), 54 deletions(-)

diff --git a/call.c b/call.c
index bd36335..098d163 100644
--- a/call.c
+++ b/call.c
@@ -82,7 +82,7 @@ int ril_request_dial(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < sizeof(RIL_Dial))
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -139,7 +139,7 @@ int ril_request_hangup(__attribute__((unused)) void *data,
 	int hangup;
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -176,7 +176,7 @@ int ril_request_answer(__attribute__((unused)) void *data,
 {
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -240,7 +240,7 @@ int ril_request_last_call_fail_cause(__attribute__((unused)) void *data,
 	int fail_cause;
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -350,7 +350,7 @@ int ril_request_get_current_calls(__attribute__((unused)) void *data,
 {
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0) {
 		ril_request_complete(token, RIL_E_SUCCESS, NULL, 0);
 		return RIL_REQUEST_COMPLETED;
@@ -486,7 +486,7 @@ int ril_request_dtmf(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < sizeof(char))
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -571,7 +571,7 @@ int ril_request_dtmf_start(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < sizeof(char))
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
diff --git a/data.c b/data.c
index 00a467d..dd12b0f 100644
--- a/data.c
+++ b/data.c
@@ -465,7 +465,7 @@ int ril_request_setup_data_call(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < 6 * sizeof(char *))
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_READY);
 	if (rc < 0) {
 		ril_request_complete(token, RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW, NULL, 0);
 		return RIL_REQUEST_COMPLETED;
@@ -661,7 +661,7 @@ int ril_request_data_call_list(__attribute__((unused)) void *data,
 {
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0) {
 		ril_request_complete(token, RIL_E_SUCCESS, NULL, 0);
 		return RIL_REQUEST_COMPLETED;
@@ -727,7 +727,7 @@ int ril_request_deactivate_data_call(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < 2 * sizeof(char *))
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -874,7 +874,7 @@ int ipc_gprs_call_status(struct ipc_message *message)
 	if (message == NULL || message->data == NULL || message->size < sizeof(struct ipc_gprs_call_status_data))
 		return -1;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_READY);
 	if (rc < 0)
 		return 0;
 
@@ -1019,7 +1019,7 @@ int ril_request_last_data_call_fail_cause(__attribute__((unused)) void *data,
 	int fail_cause;
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
diff --git a/misc.c b/misc.c
index d69f5bd..e9ec767 100644
--- a/misc.c
+++ b/misc.c
@@ -55,7 +55,7 @@ int ril_request_baseband_version(__attribute__((unused)) void *data,
 	struct ril_request *request;
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -113,7 +113,7 @@ int ril_request_get_imsi(__attribute__((unused)) void *data,
 	struct ril_request *request;
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -189,7 +189,7 @@ int ril_request_get_imei(__attribute__((unused)) void *data,
 	struct ril_request *request;
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -221,7 +221,7 @@ int ril_request_get_imeisv(__attribute__((unused)) void *data,
 	struct ril_request *request;
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -275,7 +275,7 @@ int ril_request_screen_state(void *data, size_t size, RIL_Token token)
 		return RIL_REQUEST_COMPLETED;
 	}
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
diff --git a/network.c b/network.c
index 3767072..1ce903e 100644
--- a/network.c
+++ b/network.c
@@ -397,7 +397,7 @@ int ipc_disp_icon_info(struct ipc_message *message)
 	if (message == NULL || message->data == NULL || message->size < sizeof(struct ipc_disp_icon_info_response_data))
 		return -1;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return 0;
 
@@ -426,7 +426,7 @@ int ril_request_signal_strength(__attribute__((unused)) void *data,
 	struct ipc_disp_icon_info_request_data request_data;
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -451,7 +451,7 @@ int ipc_disp_rssi_info(struct ipc_message *message)
 	if (message == NULL || message->data == NULL || message->size < sizeof(struct ipc_disp_rssi_info_data))
 		return -1;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return 0;
 
@@ -475,7 +475,7 @@ int ipc_net_plmn_sel(struct ipc_message *message)
 	if (message == NULL || message->data == NULL || message->size < sizeof(struct ipc_net_plmn_sel_response_data))
 		return -1;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return 0;
 
@@ -497,7 +497,7 @@ int ril_request_query_network_selection_mode(__attribute__((unused)) void *data,
 {
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -543,7 +543,7 @@ int ril_request_set_network_selection_automatic(__attribute__((unused)) void *da
 	struct ipc_net_plmn_sel_request_data request_data;
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -582,7 +582,7 @@ int ril_request_set_network_selection_manual(void *data, size_t size,
 		return RIL_REQUEST_COMPLETED;
 	}
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -621,7 +621,7 @@ int ipc_net_serving_network(struct ipc_message *message)
 	if (message == NULL || message->data == NULL || message->size < sizeof(struct ipc_net_regist_response_data))
 		return -1;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return 0;
 
@@ -668,7 +668,7 @@ int ril_request_operator(__attribute__((unused)) void *data,
 	unsigned int i;
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -718,7 +718,7 @@ int ipc_net_plmn_list(struct ipc_message *message)
 	if (message == NULL || message->data == NULL || message->size < sizeof(struct ipc_net_plmn_list_header))
 		return -1;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return 0;
 
@@ -794,7 +794,7 @@ int ril_request_query_available_networks(__attribute__((unused)) void *data,
 	struct ril_request *request;
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -833,7 +833,7 @@ int ipc_net_regist(struct ipc_message *message)
 	if (client == NULL || client->data == NULL)
 		return 0;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return 0;
 
@@ -934,7 +934,7 @@ int ril_request_registration_state(__attribute__((unused)) void *data,
 	unsigned int i;
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -1009,7 +1009,7 @@ int ril_request_gprs_registration_state(__attribute__((unused)) void *data,
 	unsigned int i;
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -1074,7 +1074,7 @@ int ipc_net_mode_sel(struct ipc_message *message)
 	if (message == NULL || message->data == NULL || message->size < sizeof(struct ipc_net_mode_sel_data))
 		return -1;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return 0;
 
@@ -1096,7 +1096,7 @@ int ril_request_get_preferred_network_type(__attribute__((unused)) void *data,
 {
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
diff --git a/samsung-ril.c b/samsung-ril.c
index b15c1b8..349974b 100644
--- a/samsung-ril.c
+++ b/samsung-ril.c
@@ -915,7 +915,7 @@ void *ril_request_loop(__attribute__((unused)) void *data)
 
 		RIL_LOCK();
 
-		rc = ril_radio_state_check(RADIO_STATE_OFF);
+		rc = ril_has_reached_state(RADIO_STATE_OFF);
 		if (rc < 0) {
 			RIL_UNLOCK();
 			continue;
@@ -1196,7 +1196,11 @@ int ril_radio_state_update(RIL_RadioState radio_state)
 	return 0;
 }
 
-int ril_radio_state_check(RIL_RadioState radio_state)
+/* 
+ * Returns 0 if the ril has reached the given radio_state 
+ * Returns -1 otherwise
+ */
+int ril_has_reached_state(RIL_RadioState radio_state)
 {
 	RIL_RadioState radio_states[] = {
 		RADIO_STATE_UNAVAILABLE,
diff --git a/samsung-ril.h b/samsung-ril.h
index cf6dc15..f86840e 100644
--- a/samsung-ril.h
+++ b/samsung-ril.h
@@ -203,7 +203,7 @@ void *ril_request_data_get(int request);
  */
 
 int ril_radio_state_update(RIL_RadioState radio_state);
-int ril_radio_state_check(RIL_RadioState radio_state);
+int ril_has_reached_state(RIL_RadioState radio_state);
 
 /*
  * RIL data
diff --git a/sim.c b/sim.c
index 1ce95aa..50b62e2 100644
--- a/sim.c
+++ b/sim.c
@@ -200,7 +200,7 @@ int ipc_sec_pin_status(struct ipc_message *message)
 	if (message == NULL || message->data == NULL || message->size < sizeof(struct ipc_sec_pin_status_response_data))
 		return -1;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return 0;
 
@@ -255,7 +255,7 @@ int ril_request_get_sim_status(__attribute__((unused)) void *data,
 	struct ril_request *request;
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -313,7 +313,7 @@ int ril_request_query_facility_lock(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < 4 * sizeof(char *))
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -512,7 +512,7 @@ int ril_request_set_facility_lock(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < 4 * sizeof(char *))
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -590,7 +590,7 @@ int ril_request_enter_sim_pin(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < 2 * sizeof(char *) || ril_data == NULL)
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -647,7 +647,7 @@ int ril_request_enter_sim_puk(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < 2 * sizeof(char *))
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -697,7 +697,7 @@ int ril_request_enter_sim_pin2(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < 2 * sizeof(char *))
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -747,7 +747,7 @@ int ril_request_enter_sim_puk2(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < 2 * sizeof(char *))
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -801,7 +801,7 @@ int ril_request_change_sim_pin(void *data, size_t size, RIL_Token token)
 	if (request != NULL)
 		return RIL_REQUEST_UNHANDLED;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -851,7 +851,7 @@ int ril_request_change_sim_pin2(void *data, size_t size, RIL_Token token)
 	if (request != NULL)
 		return RIL_REQUEST_UNHANDLED;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -1047,9 +1047,9 @@ int ril_request_sim_io(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < sizeof(RIL_SIM_IO_compat))
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_READY);
 	if (rc < 0) {
-		rc = ril_radio_state_check(RADIO_STATE_SIM_LOCKED_OR_ABSENT);
+		rc = ril_has_reached_state(RADIO_STATE_SIM_LOCKED_OR_ABSENT);
 		if (rc < 0)
 			return RIL_REQUEST_UNHANDLED;
 		else
@@ -1210,7 +1210,7 @@ int ipc_sec_lock_infomation(struct ipc_message *message)
 	if (message == NULL || message->data == NULL || message->size < sizeof(struct ipc_sec_lock_infomation_response_data))
 		return -1;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return 0;
 
diff --git a/sms.c b/sms.c
index 1c5d302..6b77fbe 100644
--- a/sms.c
+++ b/sms.c
@@ -205,7 +205,7 @@ int ril_request_send_sms(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < 2 * sizeof(char *))
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -345,7 +345,7 @@ int ril_request_write_sms_to_sim(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < sizeof(RIL_SMS_WriteArgs))
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -528,7 +528,7 @@ int ril_request_sms_acknowledge(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < 2 * sizeof(int))
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
diff --git a/ss.c b/ss.c
index 59e134f..51aa46d 100644
--- a/ss.c
+++ b/ss.c
@@ -121,7 +121,7 @@ int ril_request_send_ussd(void *data, size_t size, RIL_Token token)
 	if (data == NULL || size < sizeof(char *))
 		goto error;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
@@ -221,7 +221,7 @@ int ril_request_cancel_ussd(__attribute__((unused)) void *data,
 	struct ipc_ss_ussd_header ussd;
 	int rc;
 
-	rc = ril_radio_state_check(RADIO_STATE_SIM_NOT_READY);
+	rc = ril_has_reached_state(RADIO_STATE_SIM_NOT_READY);
 	if (rc < 0)
 		return RIL_REQUEST_UNHANDLED;
 
-- 
2.21.0



More information about the Replicant mailing list