ash2005 / seek-for-android

Automatically exported from code.google.com/p/seek-for-android
0 stars 0 forks source link

Reader.openSession should get an IOException when no logical channel is available. #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Since refresh tag checking is moved from logical channel to session, there is a 
chance when all logical channels are used and no available logical channel for 
GPAC enforcer to retrieve the refresh tag.   To this case, an IOException 
should be thrown in my opinion.

One of the alternative solutions is to change code on openSession() in the 
Terminal.java as follows:

public ISmartcardServiceSession openSession(SmartcardError error)
....
  try {
    mService.initializeAccessControl(Terminal.this.getName(), null);
  } catch (Exception e ){
    SmartcardService.setError(error,e);
    return null;  // Reader.openSession() will throw an IOException when session is null
  }

Original issue reported on code.google.com by danny.w....@gmail.com on 28 May 2013 at 1:19

GoogleCodeExporter commented 9 years ago
I agree, IOException makes more sense in this case. Patch will get integrated 
in future updates.
Patch attached for SCAPI-3.0.0

@Danny: pls verify and close issue when ok

Original comment by Daniel.A...@gi-de.com on 5 Jul 2013 at 2:04

Attachments: