mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-11 22:01:08 +02:00
scd: Fix select_application.
* scd/app.c (select_application): Fix the condition for open. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
f300e12a79
commit
337690441f
@ -325,11 +325,11 @@ select_application (ctrl_t ctrl, const char *name, app_t *r_app, int scan)
|
|||||||
|
|
||||||
*r_app = NULL;
|
*r_app = NULL;
|
||||||
|
|
||||||
if (scan
|
if ((scan && !app_top)
|
||||||
/* FIXME: Here, we can change code to support multiple readers.
|
/* FIXME: Here, we can change code to support multiple readers.
|
||||||
For now, we only open a single reader.
|
For now, we only open a single reader.
|
||||||
*/
|
*/
|
||||||
&& !app_top)
|
|| !app_top)
|
||||||
{
|
{
|
||||||
slot = apdu_open_reader (opt.reader_port);
|
slot = apdu_open_reader (opt.reader_port);
|
||||||
if (slot >= 0)
|
if (slot >= 0)
|
||||||
@ -374,6 +374,8 @@ select_application (ctrl_t ctrl, const char *name, app_t *r_app, int scan)
|
|||||||
}
|
}
|
||||||
unlock_app (app);
|
unlock_app (app);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
err = gpg_error (GPG_ERR_ENODEV);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user