[git] GnuPG - branch, master, updated. gnupg-2.1.10-122-g3cccd5a

by Werner Koch cvs at cvs.gnupg.org
Fri Jan 15 08:20:46 CET 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  3cccd5a83b96e4558642dcdf5d974f64ebdb9817 (commit)
      from  663c5d129a8f400cc6eb8ab7b91772d6e578152d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3cccd5a83b96e4558642dcdf5d974f64ebdb9817
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Jan 15 08:15:40 2016 +0100

    kbx,w32: Use shorter retry intervals for keybox_file_rename.
    
    * kbx/keybox-util.c (keybox_file_rename): Restart retry intervals
    after 800ms.
    --
    
    The common use case is that the process waiting for a rename does an
    import while another process does a key listing with only short lock
    periods.  Thus it does not make sense to set the final backoff time to
    8s.  It would actually be okay to retry every 100ms but that would
    spill the console with "waiting..." messages.  This change prints the
    waiting message only every 1.5s.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/kbx/keybox-util.c b/kbx/keybox-util.c
index 740ea73..13fedb3 100644
--- a/kbx/keybox-util.c
+++ b/kbx/keybox-util.c
@@ -169,16 +169,11 @@ keybox_file_rename (const char *oldname, const char *newname)
            * Note that we don't need this on Unix due to the inode
            * concept.
            *
-           * So let's wait until the rename has worked.  We use the
-           * same retry intervals as used by dotlock.c, namely 50ms,
-           * 100ms, 200ms, 400ms, 800ms, 2s, 4s and 8s.  */
-          if (!wtime)
+           * So let's wait until the rename has worked.  The retry
+           * intervals are 50, 100, 200, 400, 800, 50ms, ...  */
+          if (!wtime || wtime >= 800)
             wtime = 50;
-          else if (wtime < 800)
-            wtime *= 2;
-          else if (wtime == 800)
-            wtime = 2000;
-          else if (wtime < 8000)
+          else
             wtime *= 2;
 
           if (wtime >= 800)

-----------------------------------------------------------------------

Summary of changes:
 kbx/keybox-util.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list