diff options
author | NIIBE Yutaka <[email protected]> | 2017-01-31 03:56:11 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2017-01-31 04:04:22 +0000 |
commit | f08d37af049bf1718b301644020658dd2bb07638 (patch) | |
tree | 79861753e40e28f899f4b4c07f2fcf1c57891c0f /scd/command.c | |
parent | gpgscm: Use a compact vector representation. (diff) | |
download | gnupg-f08d37af049bf1718b301644020658dd2bb07638.tar.gz gnupg-f08d37af049bf1718b301644020658dd2bb07638.zip |
scd: Fix SERIALNO for multiple devices.
* scd/app.c (select_application): Fix the logic if periodical check is
needed. If it is needed for newly found device(s), kick the loop.
(scd_update_reader_status_file): Return value if select(2) should be
called with timeout.
* scd/ccid-driver.c (ccid_require_get_status): Don't return 0 for
token with no interrupt transfer for now.
* scd/command.c (open_card_with_request): Fix scan by SERIALNO.
* scd/scdaemon.c (update_usb): Remove.
(handle_connections): Evaluate need_tick after handle_tick.
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | scd/command.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scd/command.c b/scd/command.c index 26f8630fb..0ae6d29aa 100644 --- a/scd/command.c +++ b/scd/command.c @@ -217,13 +217,18 @@ open_card_with_request (ctrl_t ctrl, const char *apptype, const char *serialno) gpg_error_t err; unsigned char *serialno_bin = NULL; size_t serialno_bin_len = 0; + app_t app = ctrl->app_ctx; /* If we are already initialized for one specific application we need to check that the client didn't requested a specific application different from the one in use before we continue. */ - if (ctrl->app_ctx) + if (apptype && ctrl->app_ctx) return check_application_conflict (apptype, ctrl->app_ctx); + /* Re-scan USB devices. Release APP, before the scan. */ + ctrl->app_ctx = NULL; + release_application (app); + if (serialno) serialno_bin = hex_to_buffer (serialno, &serialno_bin_len); |