mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
2006-09-02 Marcus Brinkmann <marcus@g10code.de>
* command.c (get_reader_slot): Return the slot_table index, not the APDU slot number. (update_reader_status_file): Use the slot_table index in the update_card_removed invocation.
This commit is contained in:
parent
59a5681e63
commit
1c4af2666b
@ -1,3 +1,10 @@
|
|||||||
|
2006-09-02 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
|
* command.c (get_reader_slot): Return the slot_table index, not
|
||||||
|
the APDU slot number.
|
||||||
|
(update_reader_status_file): Use the slot_table index in the
|
||||||
|
update_card_removed invocation.
|
||||||
|
|
||||||
2006-09-01 Marcus Brinkmann <marcus@g10code.de>
|
2006-09-01 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
* command.c (cmd_getinfo): Handle status command.
|
* command.c (cmd_getinfo): Handle status command.
|
||||||
|
@ -104,7 +104,9 @@ struct server_local_s
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* The table with information on all used slots. */
|
/* The table with information on all used slots. FIXME: This is a
|
||||||
|
different slot number than the one used by the APDU layer, and
|
||||||
|
should be renamed. */
|
||||||
static struct slot_status_s slot_table[10];
|
static struct slot_status_s slot_table[10];
|
||||||
|
|
||||||
|
|
||||||
@ -290,7 +292,8 @@ get_reader_slot (void)
|
|||||||
if (ss->slot == -1)
|
if (ss->slot == -1)
|
||||||
ss->slot = apdu_open_reader (opt.reader_port);
|
ss->slot = apdu_open_reader (opt.reader_port);
|
||||||
|
|
||||||
return ss->slot;
|
/* Return the slot_table index. */
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the card has not yet been opened, do it. Note that this
|
/* If the card has not yet been opened, do it. Note that this
|
||||||
@ -1762,7 +1765,10 @@ update_reader_status_file (void)
|
|||||||
|
|
||||||
log_info ("updating status of slot %d to 0x%04X\n",
|
log_info ("updating status of slot %d to 0x%04X\n",
|
||||||
ss->slot, status);
|
ss->slot, status);
|
||||||
|
|
||||||
|
/* FIXME: Should this be IDX instead of ss->slot? This
|
||||||
|
depends on how client sessions will associate the reader
|
||||||
|
status with their session. */
|
||||||
sprintf (templ, "reader_%d.status", ss->slot);
|
sprintf (templ, "reader_%d.status", ss->slot);
|
||||||
fname = make_filename (opt.homedir, templ, NULL );
|
fname = make_filename (opt.homedir, templ, NULL );
|
||||||
fp = fopen (fname, "w");
|
fp = fopen (fname, "w");
|
||||||
@ -1780,7 +1786,7 @@ update_reader_status_file (void)
|
|||||||
will set this on any card change because a reset or
|
will set this on any card change because a reset or
|
||||||
SERIALNO request must be done in any case. */
|
SERIALNO request must be done in any case. */
|
||||||
if (ss->any)
|
if (ss->any)
|
||||||
update_card_removed (ss->slot, 1); /* XXX: MB: Should be idx? */
|
update_card_removed (idx, 1);
|
||||||
|
|
||||||
ss->any = 1;
|
ss->any = 1;
|
||||||
ss->status = status;
|
ss->status = status;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user