aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-09-04 10:27:54 +0000
committerWerner Koch <[email protected]>2019-09-04 10:27:54 +0000
commitfa258379424c6d48538b054b8dc7c1ab5c2d4290 (patch)
tree1387ea37f7b81f14e4bfd4d1172fab91051cfce6
parentscd: Add option --multi to the LEARN command. (diff)
downloadgnupg-fa258379424c6d48538b054b8dc7c1ab5c2d4290.tar.gz
gnupg-fa258379424c6d48538b054b8dc7c1ab5c2d4290.zip
scd: Fix Error checking in additioal app selection.
* scd/app.c (select_additional_application): Return error for unknown NAME. -- ERR was only set but not used. Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--scd/app.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/scd/app.c b/scd/app.c
index aa21886ea..e5ec59252 100644
--- a/scd/app.c
+++ b/scd/app.c
@@ -744,7 +744,8 @@ select_additional_application_internal (card_t card, apptype_t req_apptype)
* reselect by maybe_switch_app after the select we just did. */
app->next = card->app;
card->app = app;
- log_info ("added app '%s' to the card context\n", strapptype (app->apptype));
+ log_info ("added app '%s' to the card context and switched\n",
+ strapptype (app->apptype));
leave:
if (err)
@@ -766,7 +767,7 @@ select_additional_application (ctrl_t ctrl, const char *name)
req_apptype = apptype_from_name (name);
if (!req_apptype)
- err = gpg_error (GPG_ERR_NOT_FOUND);
+ return gpg_error (GPG_ERR_NOT_FOUND);
card = ctrl->card_ctx;
if (!card)