Home GnuPG
Diffusion GnuPG f3e68e39da76

sm: Do away with the locked flag in keydb.c

Description

sm: Do away with the locked flag in keydb.c

* sm/keydb.c (struct keydb_handle): Remove field locked.
(keydb_lock): Remove use of locked flag.
(lock_all): Ditto.
(unlock_all): Ditto.
(keydb_set_flags): Use dotlock_is_locked instead of the locked flag.
(keydb_insert_cert): Ditto.
(keydb_delete): Ditto.
(keydb_search): s/keydb_lock/lock_all/.
(keydb_set_cert_flags): Ditto.
(keydb_clear_some_cert_flags): Ditto.
* sm/keydb.c (maybe_create_keybox): s/access/gnupg_access/.

We already keep the lock state in the dotlock module so it does not
make sense to add and sync another one here. Instead we use a new
dotlock function to test whether we are locked.

Details

Provenance
wernerAuthored on Mar 2 2021, 6:40 PM
Parents
rG67b82a9c607e: common: New function dotlock_is_locked.
Branches
Unknown
Tags
Unknown