All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sim: use mask for check of sim file status
@ 2010-11-05 13:05 Lucas, GuillaumeX
  2010-11-05 14:17 ` Denis Kenzior
  0 siblings, 1 reply; 4+ messages in thread
From: Lucas, GuillaumeX @ 2010-11-05 13:05 UTC (permalink / raw)
  To: ofono

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

From: Guillaume Lucas <guillaumex.lucas@intel.com>

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 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sim.c b/src/sim.c
index 02ab329..2ee2b29 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:
-- 
1.7.0.4
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


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

end of thread, other threads:[~2010-11-05 16:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-05 13:05 [PATCH] sim: use mask for check of sim file status Lucas, GuillaumeX
2010-11-05 14:17 ` Denis Kenzior
2010-11-05 16:03   ` Lucas, GuillaumeX
2010-11-05 16:52     ` Marcel Holtmann

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.