diff options
author | Werner Koch <[email protected]> | 2019-08-23 13:12:13 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-08-23 13:42:15 +0000 |
commit | 30aaa4ba007210aa043c3d524415495a4d9fd17f (patch) | |
tree | b0cd024deb8591dd301e4d7670a029aabce11a66 /kbx/keybox-update.c | |
parent | gpg: Allow --locate-external-key even with --no-auto-key-locate. (diff) | |
download | gnupg-30aaa4ba007210aa043c3d524415495a4d9fd17f.tar.gz gnupg-30aaa4ba007210aa043c3d524415495a4d9fd17f.zip |
kbx: Fix regression in compression trigger from July 18
* kbx/keybox-update.c (keybox_compress): Change condition back.
Also use make_timestamp for CUT_TIME.
--
Fixes-commit: 824ca6f042dc69edaf67bf9d4e875be75babab00
Note that the original change was not backported to 2.2.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'kbx/keybox-update.c')
-rw-r--r-- | kbx/keybox-update.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kbx/keybox-update.c b/kbx/keybox-update.c index 66430c848..e25596b26 100644 --- a/kbx/keybox-update.c +++ b/kbx/keybox-update.c @@ -675,7 +675,7 @@ keybox_compress (KEYBOX_HANDLE hd) { u32 last_maint = buf32_to_u32 (buffer+20); - if ( (last_maint + 3*3600) < make_timestamp () ) + if ( (last_maint + 3*3600) > make_timestamp () ) { fclose (fp); _keybox_release_blob (blob); @@ -700,7 +700,7 @@ keybox_compress (KEYBOX_HANDLE hd) automagically skip any blobs flagged as deleted. Thus what we only have to do is to check all ephemeral flagged blocks whether their time has come and write out all other blobs. */ - cut_time = time(NULL) - 86400; + cut_time = make_timestamp () - 86400; first_blob = 1; skipped_deleted = 0; for (rc=0; !(read_rc = _keybox_read_blob (&blob, fp, &skipped_deleted)); |