summaryrefslogtreecommitdiffstats
path: root/src/sim.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-11-05 09:05:23 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-11-05 09:14:32 -0500
commite613c686a6d87d2debb61b0bed951ec12e535d30 (patch)
treea8f40038800a38662fe5e13030b42f2fa768f6c2 /src/sim.c
parent21fb984e085e80c924fb8f62d7e374b1155d88f1 (diff)
downloadofono-e613c686a6d87d2debb61b0bed951ec12e535d30.tar.bz2
sim: Don't read EFest if the file is not available
Diffstat (limited to 'src/sim.c')
-rw-r--r--src/sim.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/sim.c b/src/sim.c
index 2ee2b29e..0792b1ca 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -1434,11 +1434,19 @@ static void sim_efust_read_cb(int ok, int length, int record,
sim->efust = g_memdup(data, length);
sim->efust_length = length;
- ofono_sim_read(sim, SIM_EFEST_FILEID,
- OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
- sim_efest_read_cb, sim);
+ /*
+ * Check whether the SIM provides EFest file
+ * According to 31.102, section 4.2.24 and 4.2.44 the EFest file
+ * must be present if EFfdn or EFbdn are present
+ */
+ if (sim_ust_is_available(sim->efust, sim->efust_length,
+ SIM_UST_SERVICE_ENABLED_SERVICE_TABLE)) {
+ ofono_sim_read(sim, SIM_EFEST_FILEID,
+ OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
+ sim_efest_read_cb, sim);
- return;
+ return;
+ }
out:
sim_retrieve_imsi(sim);