comparison simtool/main.c @ 30:84d1c31d0fad

first round of refactoring for selection among multiple readers
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 12 Feb 2021 17:09:01 +0000
parents 78f93e3c9ebf
children 8a4f3d00d997
comparison
equal deleted inserted replaced
29:d368051576d0 30:84d1c31d0fad
10 { 10 {
11 char command[512]; 11 char command[512];
12 int rc; 12 int rc;
13 13
14 setup_pcsc_context(); 14 setup_pcsc_context();
15 get_reader_name(); 15 get_reader_list();
16 select_reader_num(0);
16 if (argc < 2) 17 if (argc < 2)
17 printf("Card reader name: %s\n", reader_name_buf); 18 printf("Card reader name: %s\n", selected_reader);
18 connect_to_card(); 19 connect_to_card();
19 if (argc >= 2) { 20 if (argc >= 2) {
20 rc = dispatch_ready_argv(argc - 1, argv + 1); 21 rc = dispatch_ready_argv(argc - 1, argv + 1);
21 if (rc) 22 if (rc)
22 error_exit(); 23 error_exit();