Hi Jussi,

On 12/23/2011 12:48 PM, Kukkonen, Jussi wrote:
> Hi all,
> 
> I consistently get a crash when calling SimManager.ResetPin ("puk",
> puk, new_pin). Before this I've called ChangePin()  with wrong pin
> three times.to get "PinRequired=puk" property change.
> 
> This is a huawei E1550 USB modem.
> 

Can you please try the following patch?

Regards,
-Denis
>From 764ab4017dec61006ee7936d41e4090d58110218 Mon Sep 17 00:00:00 2001
From: Denis Kenzior <[email protected]>
Date: Fri, 23 Dec 2011 01:27:19 -0600
Subject: [PATCH] sim: Fix not creating simfs context in some cases

---
 src/sim.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/sim.c b/src/sim.c
index dae824d..4412db8 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -1732,6 +1732,8 @@ static void sim_efphase_read_cb(int ok, int length, int 
record,
 
 static void sim_initialize_after_pin(struct ofono_sim *sim)
 {
+       sim->context = ofono_sim_context_create(sim);
+
        ofono_sim_read(sim->context, SIM_EFPHASE_FILEID,
                        OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
                        sim_efphase_read_cb, sim);
@@ -1933,12 +1935,8 @@ skip_efpl:
                                                &sim->language_prefs);
 
        /* Proceed with sim initialization if we're not merely updating */
-       if (!sim->language_prefs_update) {
-               if (sim->context == NULL)
-                       sim->context = ofono_sim_context_create(sim);
-
+       if (!sim->language_prefs_update)
                __ofono_sim_recheck_pin(sim);
-       }
 
        sim->language_prefs_update = FALSE;
 }
-- 
1.7.3.4

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to