summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2010-07-07 23:58:09 +0300
committerAlon Levy <alevy@redhat.com>2010-07-07 23:58:09 +0300
commit75adeca7e3fe4eb63bc6b3dfe18445a5a91c69f0 (patch)
treecdf8096548ceb357fc820a45fd1ad3356a5c3184
parenta6097b1191ce95323155583680df02abadda800c (diff)
bug fix non default nameHEADmaster
-rw-r--r--Makefile2
-rw-r--r--SCClient.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 6059ae0..857f5d7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,3 @@
-CFLAGS=-I/usr/include/PCSC
+CFLAGS=-I/usr/include/PCSC -g
LDFLAGS=-lpcsclite
all: SCClient
diff --git a/SCClient.c b/SCClient.c
index ce1034d..2afef4d 100644
--- a/SCClient.c
+++ b/SCClient.c
@@ -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 (