From 041c764672705c842b43f4978b4a4dfd32a5977b Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 5 Dec 2008 12:01:01 +0000 Subject: 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. --- scd/command.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'scd/command.c') 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); + } } } -- cgit v1.2.3