[Pcsclite-muscle] TAG_IFD_POOLING_THREAD_WITH_TIMEOUT not working

William Roberts bill.c.roberts at gmail.com
Wed Mar 4 03:16:31 UTC 2015


Ok so I built it from source and have some logs jamed in as set below.
Looks like somehow I am returning 1 in dwSize and thought I was returning 8.

out/ifd_jni/ifd_entry.c-callIFDHGetCapabilities()-377:
TAG_IFD_POLLING_THREAD_WITH_TIMEOUT
out/ifd_jni/ifd_entry.c-callIFDHGetCapabilities()-382: requested size: 8
out/ifd_jni/ifd_entry.c-callIFDHGetCapabilities()-386: Enabling poll fn
pointer: 0x7f8f91c11f78 - 0x7f8f91c11f78 - 8
out/ifd_jni/ifd_entry.c-IFDHGetCapabilities()-674: Exit: 0
00344413 readerfactory.c:347:RFAddReader() Result code 0
00000009 readerfactory.c:348:RFAddReader() Result dwsize 1
00000002 readerfactory.c:349:RFAddReader() Result fct 8
00000002 readerfactory.c:352:RFAddReader() Using the pcscd polling thread


$ svn diff
Index: src/readerfactory.c
===================================================================
--- src/readerfactory.c (revision 7097)
+++ src/readerfactory.c (working copy)
@@ -344,6 +344,9 @@

  rv = IFDGetCapabilities(sReadersContexts[dwContext],
  TAG_IFD_POLLING_THREAD_WITH_TIMEOUT, &dwGetSize, (PUCHAR)&fct);
+ Log2(PCSC_LOG_INFO, "Result code %ld", rv);
+ Log2(PCSC_LOG_INFO, "Result dwsize %ld", dwGetSize);
+ Log2(PCSC_LOG_INFO, "Result fct %ld", sizeof(fct));
  if ((rv != SCARD_S_SUCCESS) || (dwGetSize != sizeof(fct)))
  {
  Log1(PCSC_LOG_INFO, "Using the pcscd polling thread");
@@ -510,6 +513,7 @@

  rv = IFDGetCapabilities((sReadersContexts[dwContextB]),
  TAG_IFD_POLLING_THREAD_WITH_TIMEOUT, &dwGetSize, (PUCHAR)&fct);
+ Log2(PCSC_LOG_INFO, "Result 1 %ld", rv);
  if ((rv != SCARD_S_SUCCESS) || (dwGetSize != sizeof(fct)))
  {
  Log1(PCSC_LOG_INFO, "Using the pcscd polling thread");



On Tue, Mar 3, 2015 at 5:35 PM, William Roberts <bill.c.roberts at gmail.com>
wrote:

> I have pcscd version 1.7.4 installed on Ubuntu. I am writing an IFD that
> implements
> TAG_IFD_POOLING_THREAD_WITH_TIMEOUT
>
> I added some debug logs, as seen below, and I still see the pcscd daemon
> printing "Using the pcscd polling thread"
>
> I return IFD_SUCCESS, and set *Length = sizeof(fn*) which is 8. I looked
> at the source code, and it appears that it checks the response value and
> *Length. Response should be SCARD_SUCCESS and the *Length should be 8.
> However, it doesn't seem to take that branch. I see it gets called twice in
> readerfactory.c and both code blocks are similar. Any ideas?
>
>
> out/ifd_jni/ifd_entry.c-callIFDHGetCapabilities()-377:
> TAG_IFD_POLLING_THREAD_WITH_TIMEOUT
> out/ifd_jni/ifd_entry.c-callIFDHGetCapabilities()-382: requested size: 8
> out/ifd_jni/ifd_entry.c-callIFDHGetCapabilities()-386: Enabling poll fn
> pointer: 0x7f73c7568f78 - 0x7f73c7568f78 - 8
> out/ifd_jni/ifd_entry.c-IFDHGetCapabilities()-674: Exit: 0
> 00255688 readerfactory.c:290:RFAddReader() Using the pcscd polling thread
> out/ifd_jni/ifd_entry.c-IFDHICCPresence()-725: Enter: Lun: 0
> TAG
>
> $ pcscd -v
> pcsc-lite version 1.7.4.
> Copyright (C) 1999-2002 by David Corcoran <corcoran at linuxnet.com>.
> Copyright (C) 2001-2011 by Ludovic Rousseau <ludovic.rousseau at free.fr>.
> Copyright (C) 2003-2004 by Damien Sauveron <sauveron at labri.fr>.
> Report bugs to <muscle at lists.musclecard.com>.
> Enabled features: Linux x86_64-pc-linux-gnu serial usb libudev
> usbdropdir=/usr/lib/pcsc/drivers ipcdir=/var/run/pcscd
> configdir=/etc/reader.conf.d
>
>
>
> --
> Respectfully,
>
> William C Roberts
>
>


-- 
Respectfully,

William C Roberts
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20150303/e4efee7e/attachment.html>


More information about the Pcsclite-muscle mailing list