agent: Fix long standing regression tracking the connection count.
authorWerner Koch <wk@gnupg.org>
Sat, 6 Aug 2016 08:14:17 +0000 (10:14 +0200)
committerWerner Koch <wk@gnupg.org>
Sat, 6 Aug 2016 08:15:47 +0000 (10:15 +0200)
commit40d16029ed8b334c371fa7f24ac762d47302826e
treebe45cdb7a072cbd704c9e0fe35970a0590b1ceb7
parent894789c3299dc47a8c1ccaaa7070382f0fae0262
agent: Fix long standing regression tracking the connection count.

* agent/gpg-agent.c (get_agent_active_connection_count): New.
(do_start_connection_thread, start_connection_thread_ssh): Bump
ACTIVE_CONNECTIONS up and down.
* agent/command.c (cmd_getinfo): Add subcommand "connections".
--

The variable ACTIVE_CONNECTIONS is used to shutdown gpg-agent in a
friendly way.  Before we switched to nPth a Pth provided count of
threads was used for this.  During the migration to nPth
ACTIVE_CONNECTIONS was introduced and checked but never set.

Signed-off-by: Werner Koch <wk@gnupg.org>
agent/agent.h
agent/command.c
agent/gpg-agent.c