All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sim: Ensure to call sim_pin_check
@ 2010-08-25 10:28 Yang Gu
  2010-08-25 13:12 ` Jeevaka.Badrappan
  0 siblings, 1 reply; 6+ messages in thread
From: Yang Gu @ 2010-08-25 10:28 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

In current code, sim_pin_check() is called inside sim_efpl_read_cb().
However, there may be a chance it would never be called, thus the modem
won't be initialized correctly.
---
 src/sim.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sim.c b/src/sim.c
index a450b30..9bc9906 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -1380,8 +1380,6 @@ skip_efpl:
 						"PreferredLanguages",
 						DBUS_TYPE_STRING,
 						&sim->language_prefs);
-
-	sim_pin_check(sim);
 }
 
 static void sim_iccid_read_cb(int ok, int length, int record,
@@ -1454,6 +1452,8 @@ static void sim_initialize(struct ofono_sim *sim)
 	ofono_sim_read(sim, SIM_EFPL_FILEID,
 			OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
 			sim_efpl_read_cb, sim);
+
+	sim_pin_check(sim);
 }
 
 static void sim_op_error(struct ofono_sim *sim)
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-08-25 15:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-25 10:28 [PATCH] sim: Ensure to call sim_pin_check Yang Gu
2010-08-25 13:12 ` Jeevaka.Badrappan
2010-08-25 13:57   ` Pekka Pessi
2010-08-25 14:41   ` Gu, Yang
2010-08-25 15:06     ` Denis Kenzior
2010-08-25 15:22       ` Gu, Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.