summaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2023-08-29 13:18:13 +0200
committerWerner Koch <wk@gnupg.org>2023-08-29 13:18:13 +0200
commita430f2254999383d48d3891a79623a4b33e7ce2d (patch)
treebb5112359a5e1f2d607b9bba24c1fa5331925508 /g10
parentagent: Add agent_kick_the_loop function. (diff)
downloadgnupg2-a430f2254999383d48d3891a79623a4b33e7ce2d.tar.xz
gnupg2-a430f2254999383d48d3891a79623a4b33e7ce2d.zip
common: Prepare for more flags in start_new_service.
* common/asshelp.h (ASSHELP_FLAG_AUTOSTART): New. * common/asshelp.c (start_new_service): Rename arg autostart to flags and adjust checks. (start_new_gpg_agent): Likewise. Change all callers. (start_new_keyboxd): Likewise. Change all callers. (start_new_dirmngr): Likewise. Change all callers. -- It is easier to have a generic flags arg instead of adding more and more dedicated args. verbose and debug are kept as they are because they are not boolean.
Diffstat (limited to 'g10')
-rw-r--r--g10/call-agent.c3
-rw-r--r--g10/call-dirmngr.c3
-rw-r--r--g10/call-keyboxd.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c
index b0bccc0a5..d6e4575c3 100644
--- a/g10/call-agent.c
+++ b/g10/call-agent.c
@@ -248,7 +248,8 @@ start_agent (ctrl_t ctrl, int flag_for_card)
opt.agent_program,
opt.lc_ctype, opt.lc_messages,
opt.session_env,
- opt.autostart, opt.verbose, DBG_IPC,
+ opt.autostart?ASSHELP_FLAG_AUTOSTART:0,
+ opt.verbose, DBG_IPC,
NULL, NULL);
if (!opt.autostart && gpg_err_code (rc) == GPG_ERR_NO_AGENT)
{
diff --git a/g10/call-dirmngr.c b/g10/call-dirmngr.c
index c47bf0928..d00f61450 100644
--- a/g10/call-dirmngr.c
+++ b/g10/call-dirmngr.c
@@ -166,7 +166,8 @@ create_context (ctrl_t ctrl, assuan_context_t *r_ctx)
err = start_new_dirmngr (&ctx,
GPG_ERR_SOURCE_DEFAULT,
opt.dirmngr_program,
- opt.autostart, opt.verbose, DBG_IPC,
+ opt.autostart?ASSHELP_FLAG_AUTOSTART:0,
+ opt.verbose, DBG_IPC,
NULL /*gpg_status2*/, ctrl);
if (!opt.autostart && gpg_err_code (err) == GPG_ERR_NO_DIRMNGR)
{
diff --git a/g10/call-keyboxd.c b/g10/call-keyboxd.c
index dc3d30a93..960979aae 100644
--- a/g10/call-keyboxd.c
+++ b/g10/call-keyboxd.c
@@ -150,7 +150,8 @@ create_new_context (ctrl_t ctrl, assuan_context_t *r_ctx)
err = start_new_keyboxd (&ctx,
GPG_ERR_SOURCE_DEFAULT,
opt.keyboxd_program,
- opt.autostart, opt.verbose, DBG_IPC,
+ opt.autostart?ASSHELP_FLAG_AUTOSTART:0,
+ opt.verbose, DBG_IPC,
NULL, ctrl);
if (!opt.autostart && gpg_err_code (err) == GPG_ERR_NO_KEYBOXD)
{