From aa2c87886f8c72f962d145b1e5254a8882f30ebe Mon Sep 17 00:00:00 2001 From: Guillaume Lucas Date: Fri, 5 Nov 2010 13:05:05 +0000 Subject: [PATCH] sim: use mask for check of sim file status It is the first bit of the sim file status who indicates if a file is valid or not. So a mask must be used to check this. --- src/sim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sim.c b/src/sim.c index 02ab3290..2ee2b29e 100644 --- a/src/sim.c +++ b/src/sim.c @@ -1290,7 +1290,7 @@ static void sim_efbdn_info_read_cb(int ok, unsigned char file_status, if (!ok) goto out; - if (file_status == SIM_FILE_STATUS_VALID) + if (file_status & SIM_FILE_STATUS_VALID) sim_bdn_enabled(sim); out: @@ -1327,7 +1327,7 @@ static void sim_efadn_info_read_cb(int ok, unsigned char file_status, if (!ok) goto out; - if (file_status != SIM_FILE_STATUS_VALID) + if (!(file_status & SIM_FILE_STATUS_VALID)) sim_fdn_enabled(sim); out: