summaryrefslogtreecommitdiffstats
path: root/scd/app.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2003-08-05 19:11:04 +0200
committerWerner Koch <wk@gnupg.org>2003-08-05 19:11:04 +0200
commit1bcf8ef9dea1a9b171c27ef48cadb79df6201e33 (patch)
tree2ad720429f4b04941ebf0fcbe005e63c89fe69c6 /scd/app.c
parentThis commit was manufactured by cvs2svn to create branch (diff)
downloadgnupg2-1bcf8ef9dea1a9b171c27ef48cadb79df6201e33.tar.xz
gnupg2-1bcf8ef9dea1a9b171c27ef48cadb79df6201e33.zip
Cleanups, fixes and PC/SC support
Diffstat (limited to 'scd/app.c')
-rw-r--r--scd/app.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/scd/app.c b/scd/app.c
index 7a85df336..04b421b55 100644
--- a/scd/app.c
+++ b/scd/app.c
@@ -30,17 +30,26 @@
#include "apdu.h"
#include "iso7816.h"
+static char *default_reader_port;
+
+void
+app_set_default_reader_port (const char *portstr)
+{
+ xfree (default_reader_port);
+ default_reader_port = portstr? xstrdup (portstr): NULL;
+}
+
+
/* The select the best fitting application and return a context.
Returns NULL if no application was found or no card is present. */
APP
select_application (void)
{
- int reader_port = 32768; /* First USB reader. */
int slot;
int rc;
APP app;
- slot = apdu_open_reader (reader_port);
+ slot = apdu_open_reader (default_reader_port);
if (slot == -1)
{
log_error ("card reader not available\n");