vpcd-config: use the configured maximum number of slots

This commit is contained in:
Frank Morgner
2015-08-13 06:38:46 +02:00
parent 24dbde75b0
commit f0c0805679
2 changed files with 2 additions and 7 deletions

View File

@@ -2,6 +2,6 @@ EXTRA_DIST = qransi.c
bin_PROGRAMS = vpcd-config
vpcd_config_CFLAGS = $(PCSC_CFLAGS) $(QRENCODE_CFLAGS) -I$(srcdir)/../vpcd
vpcd_config_CFLAGS = $(QRENCODE_CFLAGS) -I$(srcdir)/../vpcd
vpcd_config_SOURCES = vpcd-config.c local-ip.c
vpcd_config_LDADD = $(QRENCODE_LIBS)

View File

@@ -29,12 +29,7 @@ extern const char *local_ip (void);
#include <process.h>
#include <string.h>
#else
/* pcscd allows at most 16 readers. We will use 10.
* See PCSCLITE_MAX_READERS_CONTEXTS in pcsclite.h */
#include <pcsclite.h>
#define VICC_MAX_SLOTS \
(PCSCLITE_MAX_READERS_CONTEXTS > 6 ? \
PCSCLITE_MAX_READERS_CONTEXTS-6 : 1)
#define VICC_MAX_SLOTS VPCDSLOTS
#endif
#define ERROR_STRING "Unable to guess local IP address"