[Pcsclite-git-commit] [CCID] 01/03: scardcontrol: improve outout for change Pin
Ludovic Rousseau
rousseau at moszumanska.debian.org
Fri Jul 1 15:43:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
rousseau pushed a commit to branch master
in repository CCID.
commit 38d8ff72eb2f92bcf5ba2daa9074b24fb887973e
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date: Fri Jul 1 10:58:35 2016 +0200
scardcontrol: improve outout for change Pin
For the change PIN sequence we print a new line for non-keyboard pinpad
so that the output is nicer.
---
examples/scardcontrol.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/examples/scardcontrol.c b/examples/scardcontrol.c
index 5235ae8..879695b 100644
--- a/examples/scardcontrol.c
+++ b/examples/scardcontrol.c
@@ -790,12 +790,6 @@ int main(int argc, char *argv[])
rv = SCardControl(hCard, modify_ioctl, bSendBuffer,
length, bRecvBuffer, sizeof(bRecvBuffer), &length);
- printf(" card response:");
- for (i=0; i<length; i++)
- printf(" %02X", bRecvBuffer[i]);
- printf("\n");
- PCSC_ERROR_CONT(rv, "SCardControl")
-
{
#ifndef S_SPLINT_S
fd_set fd;
@@ -823,9 +817,23 @@ int main(int argc, char *argv[])
if (ret)
printf("keyboard sent: %s", in);
}
+ else
+ {
+ /* if it is not a keyboard */
+ printf("\n");
+
+ /* exit the for() loop */
+ break;
+ }
}
}
+ printf(" card response:");
+ for (i=0; i<length; i++)
+ printf(" %02X", bRecvBuffer[i]);
+ printf("\n");
+ PCSC_ERROR_CONT(rv, "SCardControl")
+
/* modify PIN dump */
printf("\nmodify PIN dump: ");
send_length = 5;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/CCID.git
More information about the Pcsclite-cvs-commit
mailing list