Remove unused CCID_STATE_RECEIVE and CCID_STATE_SEND state.
authorNIIBE Yutaka <gniibe@fsij.org>
Fri, 9 Nov 2018 03:52:21 +0000 (12:52 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Fri, 9 Nov 2018 03:57:41 +0000 (12:57 +0900)
It was used before when Gnuk uses extended APDU exchange (7 years ago).

ChangeLog
src/gnuk.h
src/main.c

index 6ae503c..e390b57 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2018-11-09  NIIBE Yutaka  <gniibe@fsij.org>
+
+       * src/main.c (display_status_code): There is
+       no case where ccid_state == CCID_STATE_RECEIVE.
+       * src/gnuk.h (CCID_STATE_RECEIVE): Remove.
+       (CCID_STATE_SEND): Remove.
+
 2018-10-12  NIIBE Yutaka  <gniibe@fsij.org>
 
        * src/usb-ccid.c (ccid_thread): Notify host about ack button.
index e2ea0a3..a03f4b4 100644 (file)
@@ -54,11 +54,10 @@ enum ccid_state {
   CCID_STATE_NOCARD,           /* No card available */
   CCID_STATE_START,            /* Initial */
   CCID_STATE_WAIT,             /* Waiting APDU */
+
   CCID_STATE_EXECUTE,          /* Executing command */
   CCID_STATE_ACK_REQUIRED_0,   /* Ack required (executing)*/
   CCID_STATE_ACK_REQUIRED_1,   /* Waiting user's ACK (execution finished) */
-  CCID_STATE_RECEIVE,          /* APDU Received Partially */
-  CCID_STATE_SEND,             /* APDU Sent Partially */
 
   CCID_STATE_EXITED,           /* CCID Thread Terminated */
   CCID_STATE_EXEC_REQUESTED,   /* Exec requested */
index 9ebcc95..950c87b 100644 (file)
@@ -170,8 +170,7 @@ display_status_code (void)
        {
          usec = LED_TIMEOUT_INTERVAL;
          chopstx_poll (&usec, 1, led_event_poll);
-         emit_led (ccid_state == CCID_STATE_RECEIVE?
-                   LED_TIMEOUT_ONE : LED_TIMEOUT_ZERO, LED_TIMEOUT_STOP);
+         emit_led (LED_TIMEOUT_ZERO, LED_TIMEOUT_STOP);
        }
     }
 }