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

Add --reload command to gpgconf.

Fix a problem in exechelp.c
Get ready for a release.
This commit is contained in:
Werner Koch 2009-03-03 09:02:58 +00:00
parent b61b2f542a
commit c20b3db108
42 changed files with 6590 additions and 6466 deletions

View file

@ -1,5 +1,9 @@
2009-03-02 Werner Koch <wk@g10code.com>
* command.c (cmd_getinfo): Add subcommand "scd_running".
* call-scd.c (agent_scd_check_running): New.
* gpg-agent.c: Add missing option strings for "--batch" and
"--homedir". Reported by Petr Uzel.

View file

@ -320,6 +320,7 @@ int divert_generic_cmd (ctrl_t ctrl,
/*-- call-scd.c --*/
void initialize_module_call_scd (void);
void agent_scd_dump_state (void);
int agent_scd_check_running (void);
void agent_scd_check_aliveness (void);
int agent_reset_scd (ctrl_t ctrl);
int agent_card_learn (ctrl_t ctrl,

View file

@ -409,6 +409,16 @@ start_scd (ctrl_t ctrl)
}
/* Check whether the SCdaemon is active. This is a fast check without
any locking and might give a wrong result if another thread is about
to start the daemon or the daemon is about to be stopped.. */
int
agent_scd_check_running (void)
{
return !!primary_scd_ctx;
}
/* Check whether the Scdaemon is still alive and clean it up if not. */
void
agent_scd_check_aliveness (void)

View file

@ -1396,7 +1396,7 @@ cmd_reloadagent (assuan_context_t ctx, char *line)
pid - Return the process id of the server.
socket_name - Return the name of the socket.
ssh_socket_name - Return the name of the ssh socket.
scd_running - Return OK if the SCdaemon is already running.
*/
static int
cmd_getinfo (assuan_context_t ctx, char *line)
@ -1433,6 +1433,10 @@ cmd_getinfo (assuan_context_t ctx, char *line)
else
rc = gpg_error (GPG_ERR_NO_DATA);
}
else if (!strcmp (line, "scd_running"))
{
rc = agent_scd_check_running ()? 0 : gpg_error (GPG_ERR_GENERAL);
}
else
rc = set_error (GPG_ERR_ASS_PARAMETER, "unknown value for WHAT");
return rc;

View file

@ -2022,7 +2022,7 @@ check_own_socket_thread (void *arg)
log_error ("socket is now serviced by another server\n");
rc = 1;
}
else if (opt.verbose)
else if (opt.verbose > 1)
log_error ("socket is still served by this server\n");
xfree (buffer);