diff options
author | Werner Koch <[email protected]> | 2008-12-05 12:01:01 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2008-12-05 12:01:01 +0000 |
commit | 041c764672705c842b43f4978b4a4dfd32a5977b (patch) | |
tree | 915666ed83407455549136af3b404b2238a8b79e /scd/command.c | |
parent | Translate the oktext (yes/no). (diff) | |
download | gnupg-041c764672705c842b43f4978b4a4dfd32a5977b.tar.gz gnupg-041c764672705c842b43f4978b4a4dfd32a5977b.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | scd/command.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/scd/command.c b/scd/command.c index 7e1a12a5d..d94612daa 100644 --- a/scd/command.c +++ b/scd/command.c @@ -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); + } } } |