summaryrefslogtreecommitdiffstats
path: root/src/sim.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-11-05 09:08:52 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-11-05 09:14:32 -0500
commitd7403d521b730a40c23b75bc241632c659291148 (patch)
treec13651171902d8e99e19691ac1445fd772e7a469 /src/sim.c
parente613c686a6d87d2debb61b0bed951ec12e535d30 (diff)
downloadofono-d7403d521b730a40c23b75bc241632c659291148.tar.bz2
sim: Check both EFust and EFest for FDN & BDN
We were checking EFest only for whether BDN and FDN were enabled. According to 31.102 Section 5.3.2 we should be checking both EFust (availability of the service) and EFest (whether it is enabled)
Diffstat (limited to 'src/sim.c')
-rw-r--r--src/sim.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/sim.c b/src/sim.c
index 0792b1ca..e5e304cf 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -1381,6 +1381,7 @@ static void sim_efest_read_cb(int ok, int length, int record,
int record_length, void *userdata)
{
struct ofono_sim *sim = userdata;
+ gboolean available;
if (!ok)
goto out;
@@ -1398,8 +1399,10 @@ static void sim_efest_read_cb(int ok, int length, int record,
* (TS 31.102, Section 5.3.2: FDN capability request).
* If FDN is activated, don't continue initialization routine.
*/
- if (sim_est_is_active(sim->efest, sim->efest_length,
- SIM_EST_SERVICE_FDN))
+ available = sim_ust_is_available(sim->efust, sim->efust_length,
+ SIM_UST_SERVICE_FDN);
+ if (available && sim_est_is_active(sim->efest, sim->efest_length,
+ SIM_EST_SERVICE_FDN))
sim_fdn_enabled(sim);
/*
@@ -1407,8 +1410,10 @@ static void sim_efest_read_cb(int ok, int length, int record,
* (TS 31.102, Section 5.3.2: BDN capability request).
* If BDN service is enabled, halt the USIM initialization.
*/
- if (sim_est_is_active(sim->efest, sim->efest_length,
- SIM_EST_SERVICE_BDN))
+ available = sim_ust_is_available(sim->efust, sim->efust_length,
+ SIM_UST_SERVICE_BDN);
+ if (available && sim_est_is_active(sim->efest, sim->efest_length,
+ SIM_EST_SERVICE_BDN))
sim_bdn_enabled(sim);
out: