clean up smartcard debugging
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1318 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
05d7a550b1
commit
24680f4f8d
@ -819,7 +819,7 @@ AC_ARG_WITH(debug-smartcard,
|
||||
if test $withval != "no";
|
||||
then
|
||||
if test x"$WITH_SCARD" = "x1"; then
|
||||
AC_DEFINE(WITH_SCARD_DEBUG,1)
|
||||
AC_DEFINE(WITH_DEBUG_SCARD,1)
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
@ -63,6 +63,12 @@
|
||||
#define DEBUG_CHANNEL(args)
|
||||
#endif
|
||||
|
||||
#ifdef WITH_DEBUG_SCARD
|
||||
#define DEBUG_SCARD(args) printf args;
|
||||
#else
|
||||
#define DEBUG_SCARD(args)
|
||||
#endif
|
||||
|
||||
#define STRNCPY(dst,src,n) { strncpy(dst,src,n-1); dst[n-1] = 0; }
|
||||
|
||||
#ifndef MIN
|
||||
|
17
rdpdr.c
17
rdpdr.c
@ -679,20 +679,19 @@ rdpdr_process_irp(STREAM s)
|
||||
|
||||
out.data = out.p = buffer;
|
||||
out.size = sizeof(buffer);
|
||||
#ifdef WITH_SCARD_DEBUG
|
||||
printf("[SMART-CARD TRACE]\n");
|
||||
printf("device 0x%.8x\n", device);
|
||||
printf("file 0x%.8x\n", file);
|
||||
printf("id 0x%.8x\n", id);
|
||||
#endif
|
||||
|
||||
DEBUG_SCARD(("[SMART-CARD TRACE]\n"));
|
||||
DEBUG_SCARD(("device 0x%.8x\n", device));
|
||||
DEBUG_SCARD(("file 0x%.8x\n", file));
|
||||
DEBUG_SCARD(("id 0x%.8x\n", id));
|
||||
#ifdef WITH_SCARD
|
||||
scardSetInfo(device, id, bytes_out + 0x14);
|
||||
#endif
|
||||
status = fns->device_control(file, request, s, &out);
|
||||
result = buffer_len = out.p - out.data;
|
||||
#ifdef WITH_SCARD_DEBUG
|
||||
printf("[SMART-CARD TRACE] OUT 0x%.8x\n", status);
|
||||
#endif
|
||||
|
||||
DEBUG_SCARD(("[SMART-CARD TRACE] OUT 0x%.8x\n", status));
|
||||
|
||||
/* Serial SERIAL_WAIT_ON_MASK */
|
||||
if (status == STATUS_PENDING)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user