aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scd/apdu.c2
-rw-r--r--scd/command.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/scd/apdu.c b/scd/apdu.c
index c18f6c9cf..c27233683 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -3244,7 +3244,7 @@ apdu_send_simple (int slot, int extended_mode,
* Out of historical reasons the function returns 0 on success and
* outs the status word at the end of the result to be able to get the
* status word in the case of a not provided RETBUF, R_SW can be used
- * to store the SW. But note that R_SW qill only be set if the
+ * to store the SW. But note that R_SW will only be set if the
* function returns 0. */
int
apdu_send_direct (int slot, size_t extended_length,
diff --git a/scd/command.c b/scd/command.c
index e3a27ae28..363e2f087 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -1712,7 +1712,10 @@ cmd_apdu (assuan_context_t ctx, char *line)
apdu, apdulen, handle_more,
NULL, &result, &resultlen);
if (rc)
- log_error ("apdu_send_direct failed: %s\n", gpg_strerror (rc));
+ {
+ log_error ("apdu_send_direct failed: %s\n", apdu_strerror (rc));
+ rc = iso7816_map_sw (rc);
+ }
else
{
rc = assuan_send_data (ctx, result, resultlen);