diff options
author | Alon Levy <alevy@redhat.com> | 2010-07-07 23:58:09 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2010-07-07 23:58:09 +0300 |
commit | 75adeca7e3fe4eb63bc6b3dfe18445a5a91c69f0 (patch) | |
tree | cdf8096548ceb357fc820a45fd1ad3356a5c3184 | |
parent | a6097b1191ce95323155583680df02abadda800c (diff) |
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | SCClient.c | 7 |
2 files changed, 5 insertions, 4 deletions
@@ -1,3 +1,3 @@ -CFLAGS=-I/usr/include/PCSC +CFLAGS=-I/usr/include/PCSC -g LDFLAGS=-lpcsclite all: SCClient @@ -36,7 +36,8 @@ PrintByteArray ( void PrintUsage () { - printf ("SCardClient <host> <port>\n"); + printf ("SCardClient <host> <port> [<reader name>]\n"); + printf ("reader name defaults to: %s\n", ReaderName); } int @@ -82,7 +83,7 @@ WaitForCardInsert () { SCARD_READERSTATE_A rgReaderStates[1]; - rgReaderStates[0].szReader = ReaderName; + rgReaderStates[0].szReader = szReaderName; rgReaderStates[0].dwCurrentState = SCARD_STATE_UNAWARE; rv = SCardGetStatusChange ( @@ -152,7 +153,7 @@ main ( BYTE pbSendBuffer[APDUBufSize]; if (argc == 4) { - szReaderName = argv[2]; + szReaderName = argv[3]; } else { szReaderName = (char *) malloc (strlen (ReaderName)); strncpy ( |