comparison pcsc/main.c @ 11:60fd23186e2e

fc-pcsc-backend: flush stdout
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 14 Mar 2021 07:14:33 +0000
parents 45ea06eaa9fd
children
comparison
equal deleted inserted replaced
10:ddd767f6e15b 11:60fd23186e2e
89 select_reader_by_num(); 89 select_reader_by_num();
90 printf("R %s\n", selected_reader); 90 printf("R %s\n", selected_reader);
91 connect_to_card(); 91 connect_to_card();
92 retrieve_atr("A"); 92 retrieve_atr("A");
93 putchar('\n'); 93 putchar('\n');
94 fflush(stdout);
94 95
95 while (fgets(inbuf, sizeof inbuf, stdin)) { 96 for (; fgets(inbuf, sizeof inbuf, stdin); fflush(stdout)) {
96 rc = parse_hex_input(inbuf, cmd); 97 rc = parse_hex_input(inbuf, cmd);
97 if (rc < 0) 98 if (rc < 0)
98 continue; 99 continue;
99 if (rc < 5) { 100 if (rc < 5) {
100 printf("error: command APDU is too short\n"); 101 printf("error: command APDU is too short\n");