diff --git a/dirmngr/server.c b/dirmngr/server.c index fb619dfcc..a1d20334b 100644 --- a/dirmngr/server.c +++ b/dirmngr/server.c @@ -2130,7 +2130,7 @@ dirmngr_status_help (ctrl_t ctrl, const char *text) return err; } -/* Send a tick progress indicator back. Fixme: This is only does for +/* Send a tick progress indicator back. Fixme: This is only done for the currently active channel. */ gpg_error_t dirmngr_tick (ctrl_t ctrl) diff --git a/g10/call-dirmngr.c b/g10/call-dirmngr.c index 75f25f8a4..2310d8bd7 100644 --- a/g10/call-dirmngr.c +++ b/g10/call-dirmngr.c @@ -71,10 +71,10 @@ struct ks_put_parm_s /* Data used to associate an session with dirmngr contexts. We can't use a simple one to one mapping because we sometimes need two - connection s to the dirmngr; for example while doing a listing and + connections to the dirmngr; for example while doing a listing and being in a data callback we may want to retrieve a key. The local dirmngr data takes care of this. At the end of the session the - function dirmngr_deinit_session_data is called bu gpg.c to cleanup + function dirmngr_deinit_session_data is called by gpg.c to cleanup these resources. Note that gpg.h defines a typedef dirmngr_local_t for this structure. */ struct dirmngr_local_s @@ -109,9 +109,8 @@ gpg_dirmngr_deinit_session_data (ctrl_t ctrl) } -/* Try to connect to the Dirmngr via a socket or fork it off if - possible. Handle the server's initial greeting and set global - options. */ +/* Try to connect to the Dirmngr via a socket or spawn it if possible. + Handle the server's initial greeting and set global options. */ static gpg_error_t create_context (ctrl_t ctrl, assuan_context_t *r_ctx) { @@ -135,7 +134,9 @@ create_context (ctrl_t ctrl, assuan_context_t *r_ctx) /* Set all configured keyservers. We clear existing keyservers so that any keyserver configured in GPG overrides keyservers - possibly configured in Dirmngr. */ + possibly still configured in Dirmngr for the session (Note + that the keyserver list of a session in Dirmngr survives a + RESET. */ for (ksi = opt.keyserver; !err && ksi; ksi = ksi->next) { char *line; @@ -166,8 +167,8 @@ create_context (ctrl_t ctrl, assuan_context_t *r_ctx) /* Get a context for accessing dirmngr. If no context is available a - new one is created and - if requred - dirmngr started. On success - an assuan context is stored at R_CTX. This Context may only be + new one is created and - if required - dirmngr started. On success + an assuan context is stored at R_CTX. This context may only be released by means of close_context. Note that NULL is stored at R_CTX on error. */ static gpg_error_t @@ -199,7 +200,7 @@ open_context (ctrl_t ctrl, assuan_context_t *r_ctx) xfree (dml); return err; } - /* To be on the Pth thread safe site we need to add it to a + /* To be on the nPth thread safe site we need to add it to a list; this is far easier than to have a lock for this function. It should not happen anyway but the code is free because we need it for the is_active check above. */ diff --git a/g10/keyserver.c b/g10/keyserver.c index 28b4a1010..b8ab81e46 100644 --- a/g10/keyserver.c +++ b/g10/keyserver.c @@ -1650,13 +1650,16 @@ keyserver_put (ctrl_t ctrl, strlist_t keyspecs, } +/* Loop over all URLs in STRLIST and fetch the key that URL. Note + that the fetch operation ignores the configured key servers and + instead directly retrieves the keys. */ int keyserver_fetch (ctrl_t ctrl, strlist_t urilist) { gpg_error_t err; strlist_t sl; estream_t datastream; - unsigned int options = opt.keyserver_options.import_options; + unsigned int save_options = opt.keyserver_options.import_options; /* Switch on fast-import, since fetch can handle more than one import and we don't want each set to rebuild the trustdb. @@ -1686,7 +1689,7 @@ keyserver_fetch (ctrl_t ctrl, strlist_t urilist) es_fclose (datastream); } - opt.keyserver_options.import_options = options; + opt.keyserver_options.import_options = save_options; /* If the original options didn't have fast import, and the trustdb is dirty, rebuild. */