libchipcard and libccid with pcsclite logging
Thomas Viehmann <[email protected]>
| Newsgroups | gmane.comp.lib.libchipcard.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Martin, do you think that providing compatibility functions debug_msg() and log_xxd() is an option for you? I've got this message and patch from the Debian and upstream maintainer of libccid. (Apologies if you are already aware.) Kind regards T. P.S.: This is in English for the CC: to the Debian BTS. If you want followups to be recorded, it would be nice of you to keep this CC. -------- Original Message -------- Date: Sun, 23 Apr 2006 18:26:54 +0200 From: Ludovic Rousseau <[email protected]> [...] As the Debian maintainer of libccid I do not plan to provide two different binaries of libccid. As the upstream author of libccid I modified it to make its use as easy as possible in libchipcard2. The libccid driver uses two functions from pcscd: debug_msg() and log_xxd() to log through pcscd. To use the same binary in libchipcard2 the easiest solution is for libchipcard2 to also provide these two functions. A patch is included below. The file src/drivers/ccid/driverccid.c is patched to provide the two needed functions. They just do nothing. You can add some code to printf() the log message if you want. You can even reuse the file ccid/src/debug.c from the libccid driver if you want (licence is LGPL). The file src/drivers/ccid/Makefile.am is patched so that the two functions are available to external modules. If -export-dynamic is not used the symbols are not visible from libccid. The file src/drivers/ccid/Makefile.in is patched so that you do not have to regenerate the file from Makefile.am. This patch is only needed to rebuild the Debian package. Upstream only has to patch Makefile.am. I tested the patch. I suggest to propose it upstream. Bye, diff -ru libchipcard2-1.9.19.99+1.9.20beta/src/drivers/ccid/driverccid.c libchipcard2-1.9.19.99+1.9.20beta.new/src/drivers/ccid/driverccid.c --- libchipcard2-1.9.19.99+1.9.20beta/src/drivers/ccid/driverccid.c 2005-12-09 01:52:34.000000000 +0100 +++ libchipcard2-1.9.19.99+1.9.20beta.new/src/drivers/ccid/driverccid.c 2006-04-18 14:38:42.000000000 +0200 @@ -1032,4 +1032,12 @@ return errbuf; } +void debug_msg(const int priority, const char *fmt, ...) +{ +} + +void log_xxd(const int priority, const char *msg, const unsigned char *buffer, + const int size) +{ +} diff -ru libchipcard2-1.9.19.99+1.9.20beta/src/drivers/ccid/Makefile.am libchipcard2-1.9.19.99+1.9.20beta.new/src/drivers/ccid/Makefile.am --- libchipcard2-1.9.19.99+1.9.20beta/src/drivers/ccid/Makefile.am 2005-12-07 16:41:36.000000000 +0100 +++ libchipcard2-1.9.19.99+1.9.20beta.new/src/drivers/ccid/Makefile.am 2006-04-18 15:19:13.000000000 +0200 @@ -19,7 +19,7 @@ ccid_LDADD=../../lib/chipcard2-server/driver/libchipcard2d.la \ @gwenhywfar_libs@ @libusb_libs@ @libsysfs_libs@ -ccid_LDFLAGS=@STRIPALL@ +ccid_LDFLAGS=@STRIPALL@ -export-dynamic MAINTAINERCLEANFILES=Makefile.in diff -ru libchipcard2-1.9.19.99+1.9.20beta/src/drivers/ccid/Makefile.in libchipcard2-1.9.19.99+1.9.20beta.new/src/drivers/ccid/Makefile.in --- libchipcard2-1.9.19.99+1.9.20beta/src/drivers/ccid/Makefile.in 2006-01-26 14:45:31.000000000 +0100 +++ libchipcard2-1.9.19.99+1.9.20beta.new/src/drivers/ccid/Makefile.in 2006-04-18 15:25:59.000000000 +0200 @@ -277,7 +277,7 @@ main.c ccid_LDADD = ../../lib/chipcard2-server/driver/libchipcard2d.la \ - @gwenhywfar_libs@ @libusb_libs@ @libsysfs_libs@ + @gwenhywfar_libs@ @libusb_libs@ @libsysfs_libs@ -export-dynamic ccid_LDFLAGS = @STRIPALL@ MAINTAINERCLEANFILES = Makefile.in -- Dr Ludovic Rousseau [email protected] -- Normaliser Unix c'est comme pasteuriser le camembert, L.R. -- ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642