Hi Kristen,
2010/8/24 Kristen Carlson Accardi <kristen(a)linux.intel.com>:
static void sim_pin_check(struct ofono_sim *sim)
{
+ if (!(sim->status & SIM_STATUS_READY)) {
+ sim->status |= SIM_STATUS_WAITING_FOR_PIN;
+ return;
+ }
+
+ if (sim->status & SIM_STATUS_WAITING_FOR_PIN)
+ sim->status &= ~(SIM_STATUS_WAITING_FOR_PIN);
+
if (!sim->driver->query_passwd_state) {
sim_initialize_after_pin(sim);
return;
@@ -2004,6 +2016,16 @@ static void sim_free_state(struct ofono_sim *sim)
}
sim->mnc_length = 0;
+
+ sim->status = 0;
+}
+
+void ofono_sim_ready_notify(struct ofono_sim *sim)
+{
+ sim->status |= SIM_STATUS_READY;
+
+ if (sim->status & SIM_STATUS_WAITING_FOR_PIN)
+ sim_pin_check(sim);
I thought the idea was to call ofono_sim_ready_notify() some time
after entering the pin. Also, if there is no pin check or if it fails,
sim core should try to read pin-proteted files.
--
Pekka.Pessi mail at
nokia.com