diff options
author | Samrat Guha Niyogi <samrat.guha.niyogi@intel.com> | 2016-08-06 09:55:30 +0530 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2016-08-06 10:53:40 -0500 |
commit | e3f1eae928eb774792510b9d437e9858e10923c1 (patch) | |
tree | 93ef84db1edced452a3076c2266c9f7d109a1a5e | |
parent | 3b5475d942effa63483ad24c5805ab0b52e6ee64 (diff) | |
download | ofono-e3f1eae928eb774792510b9d437e9858e10923c1.tar.gz |
rilmodem: Remove unneeded pin sending logic
-rw-r--r-- | drivers/rilmodem/sim.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/drivers/rilmodem/sim.c b/drivers/rilmodem/sim.c index e4112150..0eec10a4 100644 --- a/drivers/rilmodem/sim.c +++ b/drivers/rilmodem/sim.c @@ -1176,23 +1176,6 @@ static void ril_pin_send(struct ofono_sim *sim, const char *passwd, CALLBACK_WITH_FAILURE(cb, data); } -static void enter_pin_done(const struct ofono_error *error, void *data) -{ - struct change_state_cbd *csd = data; - struct sim_data *sd = ofono_sim_get_data(csd->sim); - - if (error->type != OFONO_ERROR_TYPE_NO_ERROR) { - ofono_error("%s: wrong password", __func__); - sd->unlock_pending = FALSE; - CALLBACK_WITH_FAILURE(csd->cb, csd->data); - } else { - ril_pin_change_state(csd->sim, csd->passwd_type, csd->enable, - csd->passwd, csd->cb, csd->data); - } - - g_free(csd); -} - static const char *const clck_cpwd_fac[] = { [OFONO_SIM_PASSWORD_SIM_PIN] = "SC", [OFONO_SIM_PASSWORD_SIM_PIN2] = "P2", @@ -1215,28 +1198,6 @@ static void ril_pin_change_state(struct ofono_sim *sim, struct cb_data *cbd; struct parcel rilp; - /* - * If we want to unlock a password that has not been entered yet, - * we enter it before trying to unlock. We need sd->unlock_pending as - * the password still has not yet been refreshed when this function is - * called from enter_pin_done(). - */ - if (ofono_sim_get_password_type(sim) == passwd_type - && enable == FALSE && sd->unlock_pending == FALSE) { - struct change_state_cbd *csd = g_malloc0(sizeof(*csd)); - csd->sim = sim; - csd->passwd_type = passwd_type; - csd->enable = enable; - csd->passwd = passwd; - csd->cb = cb; - csd->data = data; - sd->unlock_pending = TRUE; - - ril_pin_send(sim, passwd, enter_pin_done, csd); - - return; - } - sd->unlock_pending = FALSE; if (passwd_type >= ARRAY_SIZE(clck_cpwd_fac) || |