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

* Re: [PATCH] sim: use mask for check of sim file status
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Denis Kenzior @ 2010-11-05 14:17 UTC (permalink / raw)
  To: ofono

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

Hi Guillaume,

On 11/05/2010 08:05 AM, Lucas, GuillaumeX wrote:
> 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(-)

Good catch on these.  Patch has been applied, thanks.  I also applied a
couple of extra fixes that add more sanity checking to BDN & FDN.
Please check that my fixes didn't break anything else :)

Regards,
-Denis

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

* RE: [PATCH] sim: use mask for check of sim file status
  2010-11-05 14:17 ` Denis Kenzior
@ 2010-11-05 16:03   ` Lucas, GuillaumeX
  2010-11-05 16:52     ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Lucas, GuillaumeX @ 2010-11-05 16:03 UTC (permalink / raw)
  To: ofono

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

Hi Denis,

I've tested your changes and all is ok :)

Regards,
Guillaume

-----Original Message-----
From: Denis Kenzior [mailto:denkenz(a)gmail.com] 
Sent: Friday, November 05, 2010 3:17 PM
To: ofono(a)ofono.org
Cc: Lucas, GuillaumeX
Subject: Re: [PATCH] sim: use mask for check of sim file status

Hi Guillaume,

On 11/05/2010 08:05 AM, Lucas, GuillaumeX wrote:
> 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(-)

Good catch on these.  Patch has been applied, thanks.  I also applied a
couple of extra fixes that add more sanity checking to BDN & FDN.
Please check that my fixes didn't break anything else :)

Regards,
-Denis
---------------------------------------------------------------------
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	[flat|nested] 4+ messages in thread

* RE: [PATCH] sim: use mask for check of sim file status
  2010-11-05 16:03   ` Lucas, GuillaumeX
@ 2010-11-05 16:52     ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2010-11-05 16:52 UTC (permalink / raw)
  To: ofono

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

Hi Guillaume,

> I've tested your changes and all is ok :)

thanks for testing this. But please refrain from top posting on this
mailing list.

Regards

Marcel



^ permalink raw reply	[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.