diff options
author | Werner Koch <wk@gnupg.org> | 2011-09-23 14:43:58 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2011-09-23 14:43:58 +0200 |
commit | b73ae3ca36547939c9aaf54c0d05fbc93d47c096 (patch) | |
tree | 3e7dfac40a0da7a3a03336713a642ca093d5f6f7 /sm | |
parent | Remove support for RISCOS from dotlock.c (diff) | |
download | gnupg2-b73ae3ca36547939c9aaf54c0d05fbc93d47c096.tar.xz gnupg2-b73ae3ca36547939c9aaf54c0d05fbc93d47c096.zip |
Renamed the lock functions.
Also cleaned up the dotlock code for easier readability.
Diffstat (limited to 'sm')
-rw-r--r-- | sm/gpgsm.c | 2 | ||||
-rw-r--r-- | sm/keydb.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sm/gpgsm.c b/sm/gpgsm.c index f08e0f80f..87f94e210 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -928,7 +928,7 @@ main ( int argc, char **argv) gnupg_init_signals (0, emergency_cleanup); - create_dotlock (NULL); /* register locking cleanup */ + dotlock_create (NULL); /* Register lockfile cleanup. */ opt.session_env = session_env_new (); if (!opt.session_env) diff --git a/sm/keydb.c b/sm/keydb.c index fe5d0e741..9d1a6ef01 100644 --- a/sm/keydb.c +++ b/sm/keydb.c @@ -214,12 +214,12 @@ keydb_add_resource (const char *url, int force, int secret, int *auto_created) all_resources[used_resources].secret = secret; all_resources[used_resources].lockhandle - = create_dotlock (filename); + = dotlock_create (filename); if (!all_resources[used_resources].lockhandle) log_fatal ( _("can't create lock for `%s'\n"), filename); /* Do a compress run if needed and the file is not locked. */ - if (!make_dotlock (all_resources[used_resources].lockhandle, 0)) + if (!dotlock_take (all_resources[used_resources].lockhandle, 0)) { KEYBOX_HANDLE kbxhd = keybox_new (token, secret); @@ -228,7 +228,7 @@ keydb_add_resource (const char *url, int force, int secret, int *auto_created) keybox_compress (kbxhd); keybox_release (kbxhd); } - release_dotlock (all_resources[used_resources].lockhandle); + dotlock_release (all_resources[used_resources].lockhandle); } used_resources++; @@ -421,7 +421,7 @@ lock_all (KEYDB_HANDLE hd) break; case KEYDB_RESOURCE_TYPE_KEYBOX: if (hd->active[i].lockhandle) - rc = make_dotlock (hd->active[i].lockhandle, -1); + rc = dotlock_take (hd->active[i].lockhandle, -1); break; } if (rc) @@ -439,7 +439,7 @@ lock_all (KEYDB_HANDLE hd) break; case KEYDB_RESOURCE_TYPE_KEYBOX: if (hd->active[i].lockhandle) - release_dotlock (hd->active[i].lockhandle); + dotlock_release (hd->active[i].lockhandle); break; } } @@ -469,7 +469,7 @@ unlock_all (KEYDB_HANDLE hd) break; case KEYDB_RESOURCE_TYPE_KEYBOX: if (hd->active[i].lockhandle) - release_dotlock (hd->active[i].lockhandle); + dotlock_release (hd->active[i].lockhandle); break; } } |