summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2015-12-03 11:22:49 -0600
committerDenis Kenzior <denkenz@gmail.com>2015-12-03 11:22:49 -0600
commit014a2427f25caea8f5dcd14192ca6f6491ebd9fe (patch)
tree59fadff1a68388d537b694df51d60e828a3add8a
parentf1a79f56b316013a7e47fb37dfbbae80a7a72b81 (diff)
downloadofono-014a2427f25caea8f5dcd14192ca6f6491ebd9fe.tar.bz2
gril: Remove g_ril_reply_parse_retries
-rw-r--r--gril/grilreply.c89
-rw-r--r--gril/grilreply.h3
2 files changed, 0 insertions, 92 deletions
diff --git a/gril/grilreply.c b/gril/grilreply.c
index 476a7ddc..44f75f1a 100644
--- a/gril/grilreply.c
+++ b/gril/grilreply.c
@@ -128,92 +128,3 @@ no_calls:
return l;
}
-
-int *g_ril_reply_parse_retries(GRil *gril, const struct ril_msg *message,
- enum ofono_sim_password_type passwd_type)
-{
- struct parcel rilp;
- int i, numint;
- int *retries = g_try_malloc0(sizeof(int) * OFONO_SIM_PASSWORD_INVALID);
-
- if (retries == NULL) {
- ofono_error("%s: out of memory", __func__);
- goto no_data;
- }
-
- for (i = 0; i < OFONO_SIM_PASSWORD_INVALID; ++i)
- retries[i] = -1;
-
- g_ril_init_parcel(message, &rilp);
-
- /* maguro/infineon: no data is returned */
- if (parcel_data_avail(&rilp) == 0)
- goto no_data;
-
- numint = parcel_r_int32(&rilp);
-
- switch (g_ril_vendor(gril)) {
- case OFONO_RIL_VENDOR_AOSP:
- case OFONO_RIL_VENDOR_QCOM_MSIM:
- /*
- * The number of retries is valid only when a wrong password has
- * been introduced in Nexus 4. TODO: check Nexus 5 behaviour.
- */
- if (message->error == RIL_E_PASSWORD_INCORRECT)
- retries[passwd_type] = parcel_r_int32(&rilp);
-
- g_ril_append_print_buf(gril, "{%d}", retries[passwd_type]);
- break;
- case OFONO_RIL_VENDOR_MTK:
- /*
- * Some versions of MTK modem return just the retries for the
- * password just entered while others return the retries for all
- * passwords.
- */
- if (numint == 1) {
- retries[passwd_type] = parcel_r_int32(&rilp);
-
- g_ril_append_print_buf(gril, "{%d}",
- retries[passwd_type]);
- } else if (numint == 4) {
- retries[OFONO_SIM_PASSWORD_SIM_PIN] =
- parcel_r_int32(&rilp);
- retries[OFONO_SIM_PASSWORD_SIM_PIN2] =
- parcel_r_int32(&rilp);
- retries[OFONO_SIM_PASSWORD_SIM_PUK] =
- parcel_r_int32(&rilp);
- retries[OFONO_SIM_PASSWORD_SIM_PUK2] =
- parcel_r_int32(&rilp);
-
- g_ril_append_print_buf(gril,
- "{pin %d, pin2 %d, puk %d, puk2 %d}",
- retries[OFONO_SIM_PASSWORD_SIM_PIN],
- retries[OFONO_SIM_PASSWORD_SIM_PIN2],
- retries[OFONO_SIM_PASSWORD_SIM_PUK],
- retries[OFONO_SIM_PASSWORD_SIM_PUK2]);
- } else {
- ofono_error("%s: wrong format", __func__);
- goto no_data;
- }
- break;
- case OFONO_RIL_VENDOR_INFINEON:
- ofono_error("%s: infineon type should not arrive here",
- __func__);
- g_assert(FALSE);
- break;
- }
-
- if (rilp.malformed) {
- ofono_error("%s: malformed parcel", __func__);
- goto no_data;
- }
-
- g_ril_print_response(gril, message);
-
- return retries;
-
-no_data:
- g_free(retries);
-
- return NULL;
-}
diff --git a/gril/grilreply.h b/gril/grilreply.h
index 90e63559..519b8344 100644
--- a/gril/grilreply.h
+++ b/gril/grilreply.h
@@ -34,9 +34,6 @@ extern "C" {
GSList *g_ril_reply_parse_get_calls(GRil *gril, const struct ril_msg *message);
-int *g_ril_reply_parse_retries(GRil *gril, const struct ril_msg *message,
- enum ofono_sim_password_type passwd_type);
-
#ifdef __cplusplus
}
#endif