1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Add option --card-timeout.

Add a new attribyte to app-openpgp.c
Fix two portability bugs.
Have gpg-connect-agent autostart gpg-agent on W32.
This commit is contained in:
Werner Koch 2008-12-05 12:01:01 +00:00
parent 0ec678b2af
commit 041c764672
43 changed files with 6804 additions and 6553 deletions

View file

@ -2095,14 +2095,18 @@ update_reader_status_file (int set_card_removed_flag)
}
/* Check whether a disconnect is pending. */
for (sl=session_list; sl; sl = sl->next_session)
if (!sl->disconnect_allowed)
break;
if (session_list && !sl)
if (opt.card_timeout)
{
/* At least one connection and all allow a disconnect. */
log_debug ("disconnecting card in slot %d\n", ss->slot);
apdu_disconnect (ss->slot);
for (sl=session_list; sl; sl = sl->next_session)
if (!sl->disconnect_allowed)
break;
if (session_list && !sl)
{
/* FIXME: Use a real timeout. */
/* At least one connection and all allow a disconnect. */
log_debug ("disconnecting card in slot %d\n", ss->slot);
apdu_disconnect (ss->slot);
}
}
}