mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Renamed the lock functions.
Also cleaned up the dotlock code for easier readability.
This commit is contained in:
parent
acde3f8ea6
commit
b73ae3ca36
16 changed files with 564 additions and 399 deletions
|
@ -136,7 +136,7 @@ maybe_create_keyring (char *filename, int force)
|
|||
/* To avoid races with other instances of gpg trying to create or
|
||||
update the keyring (it is removed during an update for a short
|
||||
time), we do the next stuff in a locked state. */
|
||||
lockhd = create_dotlock (filename);
|
||||
lockhd = dotlock_create (filename);
|
||||
if (!lockhd)
|
||||
{
|
||||
/* A reason for this to fail is that the directory is not
|
||||
|
@ -152,7 +152,7 @@ maybe_create_keyring (char *filename, int force)
|
|||
return gpg_error (GPG_ERR_GENERAL);
|
||||
}
|
||||
|
||||
if ( make_dotlock (lockhd, -1) )
|
||||
if ( dotlock_take (lockhd, -1) )
|
||||
{
|
||||
/* This is something bad. Probably a stale lockfile. */
|
||||
log_info ("can't lock `%s'\n", filename );
|
||||
|
@ -196,8 +196,8 @@ maybe_create_keyring (char *filename, int force)
|
|||
leave:
|
||||
if (lockhd)
|
||||
{
|
||||
release_dotlock (lockhd);
|
||||
destroy_dotlock (lockhd);
|
||||
dotlock_release (lockhd);
|
||||
dotlock_destroy (lockhd);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue