small fix for Omnikey. Works with CM4040 now.
authorWerner Koch <wk@gnupg.org>
Tue, 30 Jun 2009 08:19:28 +0000 (08:19 +0000)
committerWerner Koch <wk@gnupg.org>
Tue, 30 Jun 2009 08:19:28 +0000 (08:19 +0000)
scd/ChangeLog
scd/ccid-driver.c

index ab046b0..7862a97 100644 (file)
@@ -1,3 +1,7 @@
+2009-06-30  Werner Koch  <wk@g10code.com>
+
+       * ccid-driver.c (ccid_transceive): Set RESYNCING flag.
+
 2009-06-29  Werner Koch  <wk@g10code.com>
 
        * ccid-driver.c (ccid_transceive): Add a hack to support extended
index 3772b92..5fe7dd5 100644 (file)
@@ -2637,6 +2637,7 @@ ccid_transceive (ccid_driver_t handle,
   if (via_escape)
     nad_byte = 0;
 
+  last_tpdulen = 0;  /* Avoid gcc warning (controlled by RESYNCING). */
   for (;;)
     {
       if (next_chunk)
@@ -2870,6 +2871,7 @@ ccid_transceive (ccid_driver_t handle,
               if (use_crc)
                 tpdu[tpdulen++] = (edc >> 8);
               tpdu[tpdulen++] = edc;
+              resyncing = 1;
               DEBUGOUT_1 ("T=1: requesting an ifsc=%d\n", ifsc);
             }
           else if ( !(tpdu[1] & 0x20) && (tpdu[1] & 0x1f) == 3 && tpdu[2])